[Live-devel] Frames are corrupted

Chris Richardson (WTI) chris at gotowti.com
Thu May 1 10:19:59 PDT 2014


Hello,

 

>               00 24 67 4d 40 1e f6 04 00 83 7f e0 00 80 00 62 00 00 07 d2
00 01 d4 c1 c0 00 00 27 a1 20 00 02 62 5a 17 79 70 50 00 04 68 ee 3c 80

>Total of 44 bytes.

 

It looks like the buffer is formatted with the 16-bit length of the NAL
unit, then the NAL unit data.  So you can split that buffer by reading the
first two bytes to determine the NAL unit length, then read the NAL unit
data, then read two more bytes to determine the length of the next NAL unit
and so on, until you reach the end of the buffer.

 

In your example, you would read 0x0024 (36), then read 36 bytes for the SPS
NAL.  This would place you immediately before the 00 04, and you would then
read 0x0004 (4), then read 4 bytes for the PPS NAL.  At this point you would
be at the end of the buffer and could stop reading.

 

Chris Richardson

WTI

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140501/b20577ec/attachment-0001.html>


More information about the live-devel mailing list