mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed cTsPayload::AtPayloadStart() to ignore TS packets from other PIDs
This commit is contained in:
parent
c98fdd9120
commit
cd3cda2654
3
HISTORY
3
HISTORY
@ -9663,9 +9663,10 @@ Video Disk Recorder Revision History
|
|||||||
- EXPIRELATENCY now only applies to VPS timers.
|
- EXPIRELATENCY now only applies to VPS timers.
|
||||||
- Deleting expired timers is now triggered immediately after the timers are modified.
|
- Deleting expired timers is now triggered immediately after the timers are modified.
|
||||||
|
|
||||||
2021-04-29:
|
2021-05-11:
|
||||||
|
|
||||||
- Now using a separate fixed value for internal EPG linger time. This fixes problems with
|
- Now using a separate fixed value for internal EPG linger time. This fixes problems with
|
||||||
spawned timers jumping to the next event in case Setup.EPGLinger is very small. (reported
|
spawned timers jumping to the next event in case Setup.EPGLinger is very small. (reported
|
||||||
by Jürgen Schneider).
|
by Jürgen Schneider).
|
||||||
- Fixed a possible crash in the Schedule menu, in case Setup.EPGLinger is 0.
|
- Fixed a possible crash in the Schedule menu, in case Setup.EPGLinger is 0.
|
||||||
|
- Fixed cTsPayload::AtPayloadStart() to ignore TS packets from other PIDs.
|
||||||
|
8
remux.c
8
remux.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remux.c 4.9 2020/06/22 12:15:52 kls Exp $
|
* $Id: remux.c 5.1 2021/05/11 20:47:31 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remux.h"
|
#include "remux.h"
|
||||||
@ -1292,7 +1292,7 @@ int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
|
|||||||
tsPayload.Statistics();
|
tsPayload.Statistics();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary
|
if (tsPayload.AtPayloadStart() // stop at a new payload start to have the buffer refilled if necessary
|
||||||
|| tsPayload.Eof()) // or if we're out of data
|
|| tsPayload.Eof()) // or if we're out of data
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1445,7 +1445,7 @@ int cH264Parser::Parse(const uchar *Data, int Length, int Pid)
|
|||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary
|
if (tsPayload.AtPayloadStart() // stop at a new payload start to have the buffer refilled if necessary
|
||||||
|| tsPayload.Eof()) // or if we're out of data
|
|| tsPayload.Eof()) // or if we're out of data
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1603,7 +1603,7 @@ int cH265Parser::Parse(const uchar *Data, int Length, int Pid)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary
|
if (tsPayload.AtPayloadStart() // stop at a new payload start to have the buffer refilled if necessary
|
||||||
|| tsPayload.Eof()) // or if we're out of data
|
|| tsPayload.Eof()) // or if we're out of data
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
5
remux.h
5
remux.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __REMUX_H
|
||||||
@ -225,6 +225,7 @@ int64_t PtsDiff(int64_t Pts1, int64_t Pts2);
|
|||||||
|
|
||||||
class cTsPayload {
|
class cTsPayload {
|
||||||
private:
|
private:
|
||||||
|
public://XXX
|
||||||
uchar *data;
|
uchar *data;
|
||||||
int length;
|
int length;
|
||||||
int pid;
|
int pid;
|
||||||
@ -249,7 +250,7 @@ public:
|
|||||||
bool AtTsStart(void) { return index < length && (index % TS_SIZE) == 0; }
|
bool AtTsStart(void) { return index < length && (index % TS_SIZE) == 0; }
|
||||||
///< Returns true if this payload handler is currently pointing to first byte
|
///< Returns true if this payload handler is currently pointing to first byte
|
||||||
///< of a TS packet.
|
///< 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
|
///< Returns true if this payload handler is currently pointing to the first byte
|
||||||
///< of a TS packet that starts a new payload.
|
///< of a TS packet that starts a new payload.
|
||||||
int Available(void) { return length - index; }
|
int Available(void) { return length - index; }
|
||||||
|
Loading…
Reference in New Issue
Block a user