[vlc-devel] [PATCH] vout_wrapper: keep the initial video dimension when the display is recreated
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jun 4 13:53:17 CEST 2019
This may be useful if vout_Stop() is not called when recreating a display
module, like for adaptive streaming sources.
And make sure we don't use the display pointer once it has been freed.
---
src/video_output/vout_wrapper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 0662f4163c..b21d797ab4 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -176,7 +176,10 @@ void vout_CloseWrapper(vout_thread_t *vout)
#endif
sys->decoder_pool = NULL; /* FIXME remove */
+ // Save in case the window is reused without a vout_Stop()
+ sys->display_cfg = *sys->display->cfg;
vout_display_Delete(sys->display);
+ sys->display = NULL;
}
#ifdef _WIN32
--
2.17.1
More information about the vlc-devel
mailing list