From 0f80fc5e86302ad26d56e8056d4e7f31474b6b58 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 5 Dec 2024 10:37:15 +0100 Subject: [PATCH] Fixed handling the fps value if it can't be determined from the video data --- HISTORY | 1 + remux.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index ebdda5c6..c1658b11 100644 --- a/HISTORY +++ b/HISTORY @@ -10044,3 +10044,4 @@ Video Disk Recorder Revision History - Fixed some typos in the translation files (thanks to Stefan Hofmann). - Added some missing locking. - TS packets with errors are now skipped when parsing for frames. +- Fixed handling the fps value if it can't be determined from the video data. diff --git a/remux.c b/remux.c index f8480e87..b48fe33b 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.17 2024/12/05 10:33:31 kls Exp $ + * $Id: remux.c 5.18 2024/12/05 10:37:15 kls Exp $ */ #include "remux.h" @@ -2271,12 +2271,12 @@ int cFrameDetector::Analyze(const uchar *Data, int Length, bool ErrorCheck) framesPerSecond = 60.0 / 1.001; else { framesPerSecond = DEFAULTFRAMESPERSECOND; - dsyslog("unknown frame delta (%d), assuming %5.2f fps", Delta, DEFAULTFRAMESPERSECOND); + dsyslog("unknown frame delta (%d), assuming %5.2f fps", Delta, framesPerSecond); } } else // audio framesPerSecond = double(PTSTICKS) / Delta; // PTS of audio frames is always increasing - frameChecker->SetFrameDelta(Delta); + frameChecker->SetFrameDelta(PTSTICKS / framesPerSecond); dbgframes("\nDelta = %d FPS = %5.2f FPPU = %d NF = %d TRO = %d\n", Delta, framesPerSecond, framesPerPayloadUnit, numPtsValues + 1, parser->IFrameTemporalReferenceOffset()); synced = true; parser->SetDebug(false);