[vlc-commits] sout: transcode: fix leak

Francois Cartegnie git at videolan.org
Thu Nov 23 22:28:59 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Nov 23 22:25:10 2017 +0100| [c2786ac015bccef4155bef211c7ce30d29af06ce] | committer: Francois Cartegnie

sout: transcode: fix leak

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

 modules/stream_out/transcode/audio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index fc59201e16..4829ea9c11 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -168,8 +168,9 @@ static int transcode_audio_new( sout_stream_t *p_stream,
     /* No need to clean the fmt_out, it was freshly initialized by
      * es_format_Init in Add() */
     es_format_Copy( &id->p_decoder->fmt_out, &id->p_decoder->fmt_in );
+    free( id->p_decoder->fmt_out.p_extra );
     id->p_decoder->fmt_out.i_extra = 0;
-    id->p_decoder->fmt_out.p_extra = 0;
+    id->p_decoder->fmt_out.p_extra = NULL;
     id->p_decoder->pf_decode = NULL;
     id->p_decoder->pf_queue_audio = decoder_queue_audio;
     id->p_decoder->p_queue_ctx = id;



More information about the vlc-commits mailing list