summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-01-24 16:14:13 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-01-24 16:14:13 +0100
commita9543347afe9ea7fd031a36e97ef56ba036c1515 (patch)
treec694b7eca2c559a5e8acbe3aa23b28c23f1188d3
parent9ff0e7ef27c9676ca171b7ff9886812abd9e2c9b (diff)
downloadvdr-a9543347afe9ea7fd031a36e97ef56ba036c1515.tar.gz
vdr-a9543347afe9ea7fd031a36e97ef56ba036c1515.tar.bz2
Fixed determining the frame duration on channels where the PTS deltas jitter by +/-1 around 3600
-rw-r--r--HISTORY2
-rw-r--r--remux.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 9d4bd36b..192d1c8c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6300,3 +6300,5 @@ Video Disk Recorder Revision History
in most cases is the same as the video pid. For channels that use a separate
PCR pid, no TS packets are recorded from that PID (I have yet to see a case where
this actually is a problem).
+- Fixed determining the frame duration on channels where the PTS deltas jitter by
+ +/-1 around 3600.
diff --git a/remux.c b/remux.c
index 1f71fb3c..e2d87df4 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.39 2010/01/24 15:18:29 kls Exp $
+ * $Id: remux.c 2.40 2010/01/24 16:13:12 kls Exp $
*/
#include "remux.h"
@@ -842,7 +842,9 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
// determine frame info:
if (isVideo) {
if (Delta % 3600 == 0)
- frameDuration = 3600; // PAL, 25 fps
+ frameDuration = 3600; // PAL, 25 fps, exact timing
+ else if (abs(Delta % 3600) == 3599 || abs(Delta % 3600) == 1)
+ frameDuration = 3600; // PAL, 25 fps, timing with jitter
else if (Delta % 3003 == 0)
frameDuration = 3003; // NTSC, 29.97 fps
else if (abs(Delta - 1800) <= 1) {