From 035d5fd5b93db35ba9f1e9819244792911717776 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 22 Nov 2022 11:35:37 +0100 Subject: [PATCH] Using the frame rate parsed from the stream, with fall back to determining it from PTS values --- HISTORY | 2 ++ remux.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 573a2dc9..691c1e6e 100644 --- a/HISTORY +++ b/HISTORY @@ -9803,3 +9803,5 @@ Video Disk Recorder Revision History - Added a chapter about locking to PLUGINS.html (suggested by Markus Ehrnsperger). - Implemented parsing frame rate and image size for MPEG2, H.264 and H.265 (thanks to Christoph Haubrich). +- Using the frame rate parsed from the stream, with fall back to determining it from + PTS values. diff --git a/remux.c b/remux.c index aa09ef17..391fd6ff 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 5.3 2022/11/22 11:31:39 kls Exp $ + * $Id: remux.c 5.4 2022/11/22 11:35:37 kls Exp $ */ #include "remux.h" @@ -1989,6 +1989,11 @@ int cFrameDetector::Analyze(const uchar *Data, int Length) scanning = false; } else { + if (parser->FramesPerSecond() > 0.0) { + framesPerSecond = parser->FramesPerSecond(); + synced = true; + parser->SetDebug(false); + } framesInPayloadUnit++; if (independentFrame) numIFrames++;