Commit 5abc9423 authored by Laurent Aimar's avatar Laurent Aimar
Browse files

Copy complete es format descriptor when extra data is added.

parent f9564817
...@@ -618,11 +618,8 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) ...@@ -618,11 +618,8 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
{ {
if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra ) if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra )
{ {
p_dec->fmt_in.i_extra = p_packetizer->fmt_out.i_extra; es_format_Clean( &p_dec->fmt_in );
p_dec->fmt_in.p_extra = malloc( p_dec->fmt_in.i_extra ); es_format_Copy( &p_dec->fmt_in, &p_packetizer->fmt_out );
memcpy( p_dec->fmt_in.p_extra,
p_packetizer->fmt_out.p_extra,
p_dec->fmt_in.i_extra );
} }
while( p_packetized_block ) while( p_packetized_block )
...@@ -699,11 +696,8 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) ...@@ -699,11 +696,8 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
{ {
if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra ) if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra )
{ {
p_dec->fmt_in.i_extra = p_packetizer->fmt_out.i_extra; es_format_Clean( &p_dec->fmt_in );
p_dec->fmt_in.p_extra = malloc( p_dec->fmt_in.i_extra ); es_format_Copy( &p_dec->fmt_in, &p_packetizer->fmt_out );
memcpy( p_dec->fmt_in.p_extra,
p_packetizer->fmt_out.p_extra,
p_dec->fmt_in.i_extra );
} }
while( p_packetized_block ) while( p_packetized_block )
......
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