[Matroska-devel] AVC/H.264 bitstream issue

Vikas Malhotra ervikaspec at gmail.com
Tue Dec 3 13:28:17 CET 2013


Hello all,

I am using matroska parser to parse mkv files. When i try to parse
AVC/H.264 bitstream data and send it to my decoder, my decoder gives error
of stream corruption.

I am extracting a block frame data via mkv parser and I already have
calculated length of NAL Unit size bytes via codec private data as

length_field_size = (((unsigned char *)AVCC)[4] & 0x03) + 1

This code gives me a value 4 for all files and i am using it to
identify my NALUs from frame data but this gives me wrong results

as sometimes, my NALU size is saved in only 3 bytes instead of 4.

Is this some file format issue or am I missing something.

Please help.

Best Regards
Vikas
<http://www.vikaspec.co.cc>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20131203/680eda35/attachment.html>


More information about the Matroska-devel mailing list