[libdvbpsi-devel] [Bug?] Invalid transport_descriptors_length field calculation in NIT generator

Michael Umansky mumansky at atxnetworks.com
Wed Sep 10 10:33:45 CEST 2014


Hello,

The calculation of the transport_descriptors_length field in NIT has one 
extra byte than it should.

I am attaching the test file used to create an NIT containing one 
program. Using libdvbpsi-1.2.0.

Here is the hex dump of the output file, I have bolded the invalid byte.

% hd out.ts
00000000  47 40 10 10 00 40 b0 13  05 39 c3 00 00 f0 00 f0  
|G at ...@...9......|
00000010  06 02 9a 05 39 f0 *01*5f  b2 83 b6 ff ff ff ff ff  
|....9.._........|
00000020  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  
|................|
*
000000bc

It should be 0x00 as there are no descriptors attached. EN 300 468 
V1.13.1 explicitly states:
transport_descriptors_length: This is a 12-bit field specifying the 
total length in bytes of the TS descriptors /that follow/. (emphasis mine)

Curiously enough, if you create a dummy NIT containing no programs, the 
highlighted byte is correctly set to 0x00.

For your consideration.

Thanks,
Michael


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libdvbpsi-devel/attachments/20140910/f3109a2e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 2696 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/libdvbpsi-devel/attachments/20140910/f3109a2e/attachment.c>


More information about the libdvbpsi-devel mailing list