Commit 09b70e1c authored by Gildas Bazin's avatar Gildas Bazin

* modules/packetizer/mpeg4video.c: ts/ps muxers rely on VOL being present in the stream.

parent b7ce1c36
...@@ -336,22 +336,37 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag ) ...@@ -336,22 +336,37 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
if( p_frag->p_buffer[3] == 0xB0 || p_frag->p_buffer[3] == 0xB1 ) if( p_frag->p_buffer[3] == 0xB0 || p_frag->p_buffer[3] == 0xB1 )
{ {
#if 0
/* Remove VOS start/end code from the original stream */ /* Remove VOS start/end code from the original stream */
block_Release( p_frag ); block_Release( p_frag );
#else
/* Append the block for now since ts/ps muxers rely on VOL
* being present in the stream */
block_ChainLastAppend( &p_sys->pp_last, p_frag );
#endif
return NULL; return NULL;
} }
if( p_frag->p_buffer[3] >= 0x20 && p_frag->p_buffer[3] <= 0x2f ) if( p_frag->p_buffer[3] >= 0x20 && p_frag->p_buffer[3] <= 0x2f )
{ {
/* Copy the complete VOL */ /* Copy the complete VOL */
p_dec->fmt_out.i_extra = p_frag->i_buffer; if( p_dec->fmt_out.i_extra != p_frag->i_buffer )
p_dec->fmt_out.p_extra = {
realloc( p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); p_dec->fmt_out.p_extra =
realloc( p_dec->fmt_out.p_extra, p_frag->i_buffer );
p_dec->fmt_out.i_extra = p_frag->i_buffer;
}
memcpy( p_dec->fmt_out.p_extra, p_frag->p_buffer, p_frag->i_buffer ); memcpy( p_dec->fmt_out.p_extra, p_frag->p_buffer, p_frag->i_buffer );
ParseVOL( p_dec, &p_dec->fmt_out, ParseVOL( p_dec, &p_dec->fmt_out,
p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra );
#if 0
/* Remove from the original stream */ /* Remove from the original stream */
block_Release( p_frag ); block_Release( p_frag );
#else
/* Append the block for now since ts/ps muxers rely on VOL
* being present in the stream */
block_ChainLastAppend( &p_sys->pp_last, p_frag );
#endif
return NULL; return NULL;
} }
else else
......
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