summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-06-11 11:40:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-06-11 11:40:18 +0200
commitc90e87d71f9fba5e6fb92700d70c0ca7664c4289 (patch)
treea75959c95ffa8c8e4fe95ef5e4a602a9039ad0cc /remux.c
parentb226ab46d6de31746665997fe79c165521e793af (diff)
downloadvdr-c90e87d71f9fba5e6fb92700d70c0ca7664c4289.tar.gz
vdr-c90e87d71f9fba5e6fb92700d70c0ca7664c4289.tar.bz2
The frame detector now only starts collecting PTS values after it has seen the first I-frame
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/remux.c b/remux.c
index a62c36cd..a6c3c25e 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.54 2011/06/11 11:20:06 kls Exp $
+ * $Id: remux.c 2.55 2011/06/11 11:35:18 kls Exp $
*/
#include "remux.h"
@@ -840,7 +840,7 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
// frame rate unknown, so collect a sequence of PTS values:
if (numPtsValues < MaxPtsValues && numIFrames < 2) { // collect a sequence containing at least two I-frames
const uchar *Pes = Data + TsPayloadOffset(Data);
- if (PesHasPts(Pes)) {
+ if (numIFrames && PesHasPts(Pes)) {
ptsValues[numPtsValues] = PesGetPts(Pes);
// check for rollover:
if (numPtsValues && ptsValues[numPtsValues - 1] > 0xF0000000 && ptsValues[numPtsValues] < 0x10000000) {