[vlc-commits] transcode/audio: fix leak if transcode_audio_initialize_filters fail

Filip Roséen git at videolan.org
Fri Sep 23 16:03:29 CEST 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Sep 23 15:43:14 2016 +0200| [3342312bb785418122d41385346c10b548f99403] | committer: Thomas Guillem

transcode/audio: fix leak if transcode_audio_initialize_filters fail

fixes #17428

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/stream_out/transcode/audio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index dc465e6..46e65a4 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -253,7 +253,12 @@ int transcode_audio_process( sout_stream_t *p_stream,
             }
             if( unlikely( transcode_audio_initialize_filters( p_stream, id, p_sys,
                           &id->p_decoder->fmt_out.audio ) != VLC_SUCCESS ) )
+            {
+                block_Release( in );
+                block_Release( p_audio_buf );
+
                 return VLC_EGENERIC;
+            }
             date_Init( &id->next_input_pts, id->p_decoder->fmt_out.audio.i_rate, 1 );
             date_Set( &id->next_input_pts, p_audio_buf->i_pts );
         }



More information about the vlc-commits mailing list