Commit a643c2b7 authored by Pierre Ynard's avatar Pierre Ynard

vod: fix memleak

Port c7690cec to duplicated code
(cherry picked from commit f7ef9010f8c65b6a66a14c9c1000dc1f29f56027)
Signed-off-by: default avatarPierre Ynard <linkfanel@yahoo.fr>
parent 613d7883
...@@ -1242,12 +1242,14 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -1242,12 +1242,14 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
if( i_nal_type == 7 ) if( i_nal_type == 7 )
{ {
free( p_64_sps );
p_64_sps = vlc_b64_encode_binary( p_buffer, i_size ); p_64_sps = vlc_b64_encode_binary( p_buffer, i_size );
/* XXX: nothing ensures that i_size >= 4 ?? */ /* XXX: nothing ensures that i_size >= 4 ?? */
sprintf_hexa( hexa, &p_buffer[1], 3 ); sprintf_hexa( hexa, &p_buffer[1], 3 );
} }
else if( i_nal_type == 8 ) else if( i_nal_type == 8 )
{ {
free( p_64_pps );
p_64_pps = vlc_b64_encode_binary( p_buffer, i_size ); p_64_pps = vlc_b64_encode_binary( p_buffer, i_size );
} }
i_buffer -= i_size; i_buffer -= i_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment