Commit 963fdfcf authored by Thomas Guillem's avatar Thomas Guillem

h264_nal: nal length size of 3 is not in the spec

cf. ISO/IEC 14496-15 5.2.4.1
parent 4a8dc0f0
......@@ -111,10 +111,11 @@ void convert_h264_to_annexb( uint8_t *p_buf, uint32_t i_len,
{
uint32_t nal_len = 0, nal_pos = 0;
if( i_nal_length_size < 3 || i_nal_length_size > 4 )
if( i_nal_length_size != 4 )
return;
/* This only works for NAL sizes 3-4 */
/* This only works for a NAL length size of 4 */
/* TODO: realloc/memmove if i_nal_length_size is 2 or 1 */
while( i_len > 0 )
{
if( nal_pos < i_nal_length_size ) {
......
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