[vlc-commits] transcode/video: fix corruption of dec->fmt_in

Thomas Guillem git at videolan.org
Fri Jan 5 17:08:10 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan  5 09:45:13 2018 +0100| [1f8021e5a51384e33ae4794dd7c0a44c7e477be8] | committer: Thomas Guillem

transcode/video: fix corruption of dec->fmt_in

This could lead to a crash when the decoder module was modifying/writing on
fmt_out.video.p_palette, fmt_out.psz_description or fmt_out.p_extra_languages
(so as soon as avcodec is updating its fmt_out).

The decoder fmt_out is already initialised from transcode/transcode.c.

sq

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f8021e5a51384e33ae4794dd7c0a44c7e477be8
---

 modules/stream_out/transcode/video.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index c0d165bcac..5c4c86dacc 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -184,10 +184,6 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_sys_t *i
     /* Open decoder
      * Initialization of decoder structures
      */
-    id->p_decoder->fmt_out = id->p_decoder->fmt_in;
-    id->p_decoder->fmt_out.i_extra = 0;
-    id->p_decoder->fmt_out.p_extra = NULL;
-    id->p_decoder->fmt_out.psz_language = NULL;
     id->p_decoder->pf_decode = NULL;
     id->p_decoder->pf_queue_video = decoder_queue_video;
     id->p_decoder->p_queue_ctx = id;



More information about the vlc-commits mailing list