summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-01-23 16:43:23 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-01-23 16:43:23 +0100
commit1ca753003b97ea3df52460165118e040ae73a080 (patch)
treedb4e605a8984ba50feaf0a6db9ee69846330a211 /device.c
parent4895d6b9e2c90376f0a639ee5a9bd74d9701cf09 (diff)
downloadvdr-1ca753003b97ea3df52460165118e040ae73a080.tar.gz
vdr-1ca753003b97ea3df52460165118e040ae73a080.tar.bz2
Checking the pointer field in cPatPmtParser::ParsePmt() only in 'payload start' packets
Diffstat (limited to 'device.c')
-rw-r--r--device.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/device.c b/device.c
index d4576b03..3679651e 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.7 2009/01/18 11:42:22 kls Exp $
+ * $Id: device.c 2.8 2009/01/23 16:02:21 kls Exp $
*/
#include "device.h"
@@ -1020,12 +1020,11 @@ void cDevice::StillPicture(const uchar *Data, int Length)
uchar *buf = NULL;
int Size = 0;
while (Length >= TS_SIZE) {
- int PayloadOffset = TsPayloadOffset(Data);
int Pid = TsPid(Data);
if (Pid == 0)
- patPmtParser.ParsePat(Data + PayloadOffset, TS_SIZE - PayloadOffset);
+ patPmtParser.ParsePat(Data, TS_SIZE);
else if (Pid == patPmtParser.PmtPid())
- patPmtParser.ParsePmt(Data + PayloadOffset, TS_SIZE - PayloadOffset);
+ patPmtParser.ParsePmt(Data, TS_SIZE);
else if (Pid == patPmtParser.Vpid()) {
if (TsPayloadStart(Data)) {
int l;
@@ -1325,9 +1324,9 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
cMutexLock MutexLock(&mutexCurrentAudioTrack);
int Pid = TsPid(Data);
if (Pid == 0)
- patPmtParser.ParsePat(Data + PayloadOffset, Length - PayloadOffset);
+ patPmtParser.ParsePat(Data, Length);
else if (Pid == patPmtParser.PmtPid())
- patPmtParser.ParsePmt(Data + PayloadOffset, Length - PayloadOffset);
+ patPmtParser.ParsePmt(Data, Length);
else if (Pid == patPmtParser.Vpid())
return PlayTsVideo(Data, Length);
else if (Pid == availableTracks[currentAudioTrack].id) {