Commit 150b8bba authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Paul Saman

viddec: fix avc1->h264 packetizing

Signed-off-by: Jean-Paul Saman's avatarJean-Paul Saman <jean-paul.saman@m2x.nl>
parent 5c808483
......@@ -288,7 +288,6 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
p_sys->p_packetizer->pf_decode_sub = NULL;
p_sys->p_packetizer->pf_packetize = NULL;
es_format_Copy( &p_sys->p_packetizer->fmt_in, &p_dec->fmt_in );
p_sys->p_packetizer->fmt_in = p_dec->fmt_in;
p_sys->p_packetizer->p_module = module_Need( p_sys->p_packetizer,
"packetizer", NULL, 0 );
if( !p_sys->p_packetizer->p_module )
......@@ -296,6 +295,7 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
vlc_object_destroy( p_sys->p_packetizer );
p_sys->p_packetizer = NULL;
}
es_format_Copy( &p_dec->fmt_in, &p_sys->p_packetizer->fmt_out );
}
}
......@@ -312,7 +312,8 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
{
block_t *p_new_block = p_sys->p_packetizer->pf_packetize(
p_sys->p_packetizer, &p_block );
p_block = p_new_block;
*pp_block = p_block = p_new_block; /* keep refernce to packetized blk */
if( !p_block )
return NULL;
}
......@@ -409,8 +410,8 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
abort();
}
#endif
if( !p_sys->p_packetizer && i_extra == 0 && p_dec->fmt_in.i_extra > 0 )
{ /* FIXME : doesn't decode, for example, avc1 (avcC) */
if( i_extra == 0 && p_dec->fmt_in.i_extra > 0 )
{
msg_Dbg( p_dec, "Trying again with p_extra" );
return DecodeVideoBlockInner( p_dec, pp_block, p_dec->fmt_in.i_extra );
}
......
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