[vdr] PMT in multiple TS packet bug
Frank Schmirler
vdr at schmirler.de
Mon Jan 19 11:06:29 CET 2009
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
More information about the vdr
mailing list