From aae1aa527167c32e50e1fda77801b521cee3f76d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 10 May 2009 14:32:03 +0200 Subject: [PATCH] Added MPEG 1 handling to remux.c --- CONTRIBUTORS | 1 + HISTORY | 1 + remux.c | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 13309162..a2988366 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2398,6 +2398,7 @@ Sundararaj Reel Ales Jurik for reporting broken SI data on Czech/Slovak channels after changing the default character set to ISO-8859-9 + for adding MPEG 1 handling to remux.c Magnus Andersson for translating OSD texts to the Swedish language diff --git a/HISTORY b/HISTORY index edb75444..427841ae 100644 --- a/HISTORY +++ b/HISTORY @@ -6093,3 +6093,4 @@ Video Disk Recorder Revision History systems with no real primary replay device (reported by Martin Neuditschko). - Added a note to cTsToPes::GetPes() about having to call it repeatedly, once it has returned a non-NULL value. +- Added MPEG 1 handling to remux.c (thanks to Ales Jurik). diff --git a/remux.c b/remux.c index 58c05311..a873e2f6 100644 --- a/remux.c +++ b/remux.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remux.c 2.20 2009/05/03 14:43:25 kls Exp $ + * $Id: remux.c 2.21 2009/05/10 14:30:00 kls Exp $ */ #include "remux.h" @@ -481,6 +481,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length) for (SI::Loop::Iterator it; Pmt.streamLoop.getNext(stream, it); ) { dbgpatpmt(" stream type = %02X, pid = %d", stream.getStreamType(), stream.getPid()); switch (stream.getStreamType()) { + case 0x01: // STREAMTYPE_11172_VIDEO case 0x02: // STREAMTYPE_13818_VIDEO case 0x1B: // MPEG4 vpid = stream.getPid(); @@ -702,7 +703,7 @@ cFrameDetector::cFrameDetector(int Pid, int Type) newFrame = independentFrame = false; numPtsValues = 0; numIFrames = 0; - isVideo = type == 0x02 || type == 0x1B; // MPEG 2 or MPEG 4 + isVideo = type == 0x01 || type == 0x02 || type == 0x1B; // MPEG 1, 2 or 4 frameDuration = 0; framesInPayloadUnit = framesPerPayloadUnit = 0; payloadUnitOfFrame = 0; @@ -795,6 +796,7 @@ int cFrameDetector::Analyze(const uchar *Data, int Length) scanner <<= 8; scanner |= Data[i]; switch (type) { + case 0x01: // MPEG 1 video case 0x02: // MPEG 2 video if (scanner == 0x00000100) { // Picture Start Code if (synced && Processed)