summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-03-26 13:07:01 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-03-26 13:07:01 +0200
commitb313d88db13d1e90f81f9967af1fba8c8f84e59d (patch)
tree7f97ed5e6ca7727bb52ff4ca016125b60e96fe8b /device.c
parent9e808255f842067e0c0c9ee2344f6c1aa2860e08 (diff)
downloadvdr-b313d88db13d1e90f81f9967af1fba8c8f84e59d.tar.gz
vdr-b313d88db13d1e90f81f9967af1fba8c8f84e59d.tar.bz2
Improved clearing the MTD buffer and syncing on TS packets
Diffstat (limited to 'device.c')
-rw-r--r--device.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/device.c b/device.c
index 6f3a155d..ccd0e20a 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 4.9 2017/03/23 14:19:59 kls Exp $
+ * $Id: device.c 4.10 2017/03/26 11:35:38 kls Exp $
*/
#include "device.h"
@@ -1570,13 +1570,8 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
}
else {
while (Length >= TS_SIZE) {
- if (Data[0] != TS_SYNC_BYTE) {
- int Skipped = 1;
- while (Skipped < Length && (Data[Skipped] != TS_SYNC_BYTE || Length - Skipped > TS_SIZE && Data[Skipped + TS_SIZE] != TS_SYNC_BYTE))
- Skipped++;
- esyslog("ERROR: skipped %d bytes to sync on start of TS packet", Skipped);
+ if (int Skipped = TS_SYNC(Data, Length))
return Played + Skipped;
- }
int Pid = TsPid(Data);
if (TsHasPayload(Data)) { // silently ignore TS packets w/o payload
int PayloadOffset = TsPayloadOffset(Data);