packetizer_Init( &p_sys->packetizer,
p_h264_startcode, sizeof(p_h264_startcode),
- p_h264_startcode, 1,
+ p_h264_startcode, 1, 5,
PacketizeReset, PacketizeParse, PacketizeValidate, p_dec );
p_sys->b_slice = false;
decoder_t *p_dec = p_private;
/* Remove trailing 0 bytes */
- while( p_block->i_buffer && p_block->p_buffer[p_block->i_buffer-1] == 0x00 )
+ while( p_block->i_buffer > 5 && p_block->p_buffer[p_block->i_buffer-1] == 0x00 )
p_block->i_buffer--;
return ParseNALBlock( p_dec, pb_ts_used, p_block );
/* chroma_format_idc */
const int i_chroma_format_idc = bs_read_ue( &s );
if( i_chroma_format_idc == 3 )
- bs_skip( &s, 1 ); /* seperate_colour_plane_flag */
+ bs_skip( &s, 1 ); /* separate_colour_plane_flag */
/* bit_depth_luma_minus8 */
bs_read_ue( &s );
/* bit_depth_chroma_minus8 */