Fixed handling the pointer field in cPatPmtParser::ParsePmt()

This commit is contained in:
Klaus Schmidinger 2009-01-23 14:19:58 +01:00
parent 1789a813f7
commit a1e7922938
2 changed files with 5 additions and 3 deletions

View File

@ -5912,7 +5912,7 @@ Video Disk Recorder Revision History
can handle DVB-S2. The #define is still there to allow people with older drivers
who don't need DVB-S2 to use this version without pathcing.
2009-01-18: Version 1.7.4
2009-01-23: Version 1.7.4
- Removed the '#define FE_CAN_2ND_GEN_MODULATION', since it was wrong and the
flag is now in the driver, anyway.
@ -5945,3 +5945,5 @@ Video Disk Recorder Revision History
that was introduced in version 1.7.3.
- Added checking mutexCurrentAudioTrack to cDevice::PlayTs() (thanks to Reinhard
Nissl for pointing this out).
- Fixed handling the pointer field in cPatPmtParser::ParsePmt() (thanks to Frank
Schmirler - sorry I swapped two lines whan adopting the original patch).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: remux.c 2.7 2009/01/16 15:25:42 kls Exp $
* $Id: remux.c 2.8 2009/01/23 14:17:07 kls Exp $
*/
#include "remux.h"
@ -359,8 +359,8 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
{
// The PMT may extend over several TS packets, so we need to assemble them
if (pmtSize == 0) {
Data += Data[0] + 1; // this is the first packet
Length -= Data[0] + 1;
Data += Data[0] + 1; // this is the first packet
if (SectionLength(Data, Length) > Length) {
if (Length <= int(sizeof(pmt))) {
memcpy(pmt, Data, Length);