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 ...@@ -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_decode_sub = NULL;
p_sys->p_packetizer->pf_packetize = NULL; p_sys->p_packetizer->pf_packetize = NULL;
es_format_Copy( &p_sys->p_packetizer->fmt_in, &p_dec->fmt_in ); 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, p_sys->p_packetizer->p_module = module_Need( p_sys->p_packetizer,
"packetizer", NULL, 0 ); "packetizer", NULL, 0 );
if( !p_sys->p_packetizer->p_module ) if( !p_sys->p_packetizer->p_module )
...@@ -296,6 +295,7 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i ...@@ -296,6 +295,7 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
vlc_object_destroy( p_sys->p_packetizer ); vlc_object_destroy( p_sys->p_packetizer );
p_sys->p_packetizer = NULL; 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 ...@@ -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( block_t *p_new_block = p_sys->p_packetizer->pf_packetize(
p_sys->p_packetizer, &p_block ); 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 ) if( !p_block )
return NULL; return NULL;
} }
...@@ -409,8 +410,8 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i ...@@ -409,8 +410,8 @@ static picture_t *DecodeVideoBlockInner( decoder_t *p_dec, block_t **pp_block, i
abort(); abort();
} }
#endif #endif
if( !p_sys->p_packetizer && i_extra == 0 && p_dec->fmt_in.i_extra > 0 ) if( i_extra == 0 && p_dec->fmt_in.i_extra > 0 )
{ /* FIXME : doesn't decode, for example, avc1 (avcC) */ {
msg_Dbg( p_dec, "Trying again with p_extra" ); msg_Dbg( p_dec, "Trying again with p_extra" );
return DecodeVideoBlockInner( p_dec, pp_block, p_dec->fmt_in.i_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