Re: PMT in multiple TS packet bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 19 Jan 2009 10:44:18 +0100, Alexw wrote
> I have noticed a PMT parsing issue with VDR version 1.7.x. The bug 
> is still present in version 1.7.3 but the behaviour is worst because 
> it segfaults.
> 
> First I found out that 2 lines where added in the ParsePmt method.
> 
>      Data += Data[0] + 1; // this is the first packet
> 
>      Length -= Data[0] + 1;
> 
> At the moment I don't know exactly what is the meaning of this 2 operations.

These lines are for handling the SI pointer field. Data[0] is the pointer
field, which contains the byte offset to the actual data (usually 0). "+ 1"
for the pointer field itself. 

The order of the two statements need to be reversed. First fix the length,
then the data pointer:

     Length -= Data[0] + 1;
     Data += Data[0] + 1;

Cheers,
Frank

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux