Re: PMT in multiple TS packet bug

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

 



On Mon, 19 Jan 2009 13:32:07 +0100, Alexw wrote
> Yes Frank you are right. The problem is coming from bad CRC in the 
> PMT (and the same apply to bad PAT). If Pmt.CheckCRCAndParse() fails,
>  bad PMT data should be skipped.

Bad CRC is caught by CheckCRCAndParse(). What I had in mind is a wrong value
in the pointer field itself (e.g. due to bad weather conditions). In
ParsePat() something like

if (Data[0] + 1 >= Length) return;

should be sufficient. The same check is fine for ParsePmt(), but I'd
additionally suggest to pass the TS PUSI field as third parameter. Otherwise
it would not be possible to distinguish the first fragment from fragments
following a broken one.

if (PUSI)
  // this is the first packet
  if (Data[0] + 1 >= Length) return;
  ...
else if (pmtSize == 0)
  // fragment of broken packet - ignore
  return;
else
  // this is a following packet, so we add it to the pmt storage
  ...

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