vlc | branch: master | Francois Cartegnie <[email protected]> | Tue Mar 14 
13:15:26 2017 +0100| [05fbba35f022aa26e0d7750faebd1daa6d19f40d] | committer: 
Francois Cartegnie

packetizer: h264: missing leak handling

should not happen anyway

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

 modules/packetizer/h264.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index d2ebee3..a48408f 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -733,7 +733,10 @@ static void PutSPS( decoder_t *p_dec, block_t *p_frag )
     size_t i_buffer = p_frag->i_buffer;
 
     if( !hxxx_strip_AnnexB_startcode( &p_buffer, &i_buffer ) )
+    {
+        block_Release( p_frag );
         return;
+    }
 
     h264_sequence_parameter_set_t *p_sps = h264_decode_sps( p_buffer, 
i_buffer, true );
     if( !p_sps )
@@ -811,7 +814,10 @@ static void PutPPS( decoder_t *p_dec, block_t *p_frag )
     size_t i_buffer = p_frag->i_buffer;
 
     if( !hxxx_strip_AnnexB_startcode( &p_buffer, &i_buffer ) )
+    {
+        block_Release( p_frag );
         return;
+    }
 
     h264_picture_parameter_set_t *p_pps = h264_decode_pps( p_buffer, i_buffer, 
true );
     if( !p_pps )

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to