summaryrefslogtreecommitdiff
path: root/remux.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-05-11 20:47:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-05-11 20:47:31 +0200
commitcd3cda2654bbd4272096bbabb4953ce352de8358 (patch)
tree5b75d9336ab8467850be992ef6b5bc799ca7ba32 /remux.h
parentc98fdd91200fd31915f76248efaa26faa28ba57e (diff)
downloadvdr-cd3cda2654bbd4272096bbabb4953ce352de8358.tar.gz
vdr-cd3cda2654bbd4272096bbabb4953ce352de8358.tar.bz2
Fixed cTsPayload::AtPayloadStart() to ignore TS packets from other PIDs
Diffstat (limited to 'remux.h')
-rw-r--r--remux.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/remux.h b/remux.h
index 6ff3c971..391663b4 100644
--- a/remux.h
+++ b/remux.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.h 4.6 2020/09/16 13:48:33 kls Exp $
+ * $Id: remux.h 5.1 2021/05/11 20:47:31 kls Exp $
*/
#ifndef __REMUX_H
@@ -225,6 +225,7 @@ int64_t PtsDiff(int64_t Pts1, int64_t Pts2);
class cTsPayload {
private:
+public://XXX
uchar *data;
int length;
int pid;
@@ -249,7 +250,7 @@ public:
bool AtTsStart(void) { return index < length && (index % TS_SIZE) == 0; }
///< Returns true if this payload handler is currently pointing to first byte
///< of a TS packet.
- bool AtPayloadStart(void) { return AtTsStart() && TsPayloadStart(data + index); }
+ bool AtPayloadStart(void) { return AtTsStart() && TsPayloadStart(data + index) && TsPid(data + index) == pid; }
///< Returns true if this payload handler is currently pointing to the first byte
///< of a TS packet that starts a new payload.
int Available(void) { return length - index; }