Commit 7aa5ac93 authored by Laurent Aimar's avatar Laurent Aimar

Fixed extra data parsing with some VC1 streams.

parent a3b251ee
...@@ -155,18 +155,31 @@ static int Open( vlc_object_t *p_this ) ...@@ -155,18 +155,31 @@ static int Open( vlc_object_t *p_this )
p_sys->i_interpolated_dts = -1; p_sys->i_interpolated_dts = -1;
/* */
if( p_dec->fmt_out.i_extra > 0 )
{
uint8_t *p_extra = p_dec->fmt_out.p_extra;
if( p_dec->fmt_in.i_extra > 0 ) /* With (some) ASF the first byte has to be stripped */
if( p_extra[0] != 0x00 )
{ {
block_t *p_init = block_New( p_dec, p_dec->fmt_in.i_extra ); memcpy( &p_extra[0], &p_extra[1], p_dec->fmt_out.i_extra - 1 );
block_t *p_pic; p_dec->fmt_out.i_extra--;
}
memcpy( p_init->p_buffer, p_dec->fmt_in.p_extra, /* */
p_dec->fmt_in.i_extra ); if( p_dec->fmt_out.i_extra > 0 )
{
block_t *p_init = block_New( p_dec, p_dec->fmt_out.i_extra );
memcpy( p_init->p_buffer, p_dec->fmt_out.p_extra,
p_dec->fmt_out.i_extra );
block_t *p_pic;
while( ( p_pic = Packetize( p_dec, &p_init ) ) ) while( ( p_pic = Packetize( p_dec, &p_init ) ) )
block_Release( p_pic ); /* Should not happen (only sequence header) */ block_Release( p_pic ); /* Should not happen (only sequence header) */
} }
}
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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