[vlc-commits] [Git][videolan/vlc][master] 2 commits: mediacodec: release the native video window on cleanup
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Fri Nov 6 13:32:35 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
c9f54222 by Nir Halay at 2026-11-06T13:23:59+01:00
mediacodec: release the native video window on cleanup
Release the window acquired for direct rendering after MediaCodec is destroyed, so a new decoder can acquire the current Surface.
- - - - -
e31609fd by Nir Halay at 2026-11-06T13:23:59+01:00
android: release the native window when closing ASurfaceControl
Release the window acquired by CreateSurfaceControl so the next display fetches the current Surface instead of reusing a stale one.
- - - - -
2 changed files:
- modules/codec/omxil/mediacodec.c
- modules/video_output/android/display.c
Changes:
=====================================
modules/codec/omxil/mediacodec.c
=====================================
@@ -130,6 +130,7 @@ typedef struct decoder_sys_t
vlc_video_context *ctx;
struct asurface_picture_ctx apic_ctxs[MAX_PIC];
void *p_surface;
+ AWindowHandler *awh;
unsigned i_angle;
unsigned i_input_offset_x, i_input_offset_y;
unsigned i_input_width, i_input_height;
@@ -1046,6 +1047,7 @@ CreateSurface(decoder_t *p_dec, vlc_decoder_device *dec_dev,
msg_Err(p_dec, "Could not find a valid ANativeWindow");
goto error;
}
+ p_sys->video.awh = awh;
goto end;
}
@@ -1463,6 +1465,10 @@ static void CleanDecoder(decoder_sys_t *p_sys)
if (p_sys->video.surfacetexture)
vlc_asurfacetexture_Delete(p_sys->video.surfacetexture);
+ if (p_sys->video.awh != NULL)
+ AWindowHandler_releaseANativeWindow(p_sys->video.awh,
+ AWindow_Video);
+
if (p_sys->video.timestamp_fifo)
timestamp_FifoRelease(p_sys->video.timestamp_fifo);
break;
=====================================
modules/video_output/android/display.c
=====================================
@@ -634,6 +634,7 @@ static void Close(vout_display_t *vd)
if (sys->asc.previous_picture != NULL)
picture_Release(sys->asc.previous_picture);
asc_api->ASurfaceControl.release(sys->asc.sc);
+ AWindowHandler_releaseANativeWindow(sys->awh, AWindow_Video);
}
if (sys->sub.window != NULL)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b42a44f1f22f98544eb2532f1a03054b5ebc5739...e31609fda86d2104716b03f6c43cf3c4306b8c4d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b42a44f1f22f98544eb2532f1a03054b5ebc5739...e31609fda86d2104716b03f6c43cf3c4306b8c4d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list