transcode/audio: fix leak if transcode_audio_initialize_encoder fails
authorFilip Roséen <filip@atch.se>
Fri, 23 Sep 2016 13:43:13 +0000 (15:43 +0200)
committerThomas Guillem <thomas@gllm.fr>
Fri, 23 Sep 2016 14:03:13 +0000 (16:03 +0200)
fixes #17428

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/stream_out/transcode/audio.c

index da235ee..dc465e6 100644 (file)
@@ -245,6 +245,10 @@ int transcode_audio_process( sout_stream_t *p_stream,
             if( transcode_audio_initialize_encoder( id, p_stream ) )
             {
                 msg_Err( p_stream, "cannot create audio chain" );
+
+                block_Release( in );
+                block_Release( p_audio_buf );
+
                 return VLC_EGENERIC;
             }
             if( unlikely( transcode_audio_initialize_filters( p_stream, id, p_sys,