mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Fixed handling the fps value if it can't be determined from the video data
This commit is contained in:
parent
d169f30e5c
commit
0f80fc5e86
1
HISTORY
1
HISTORY
@ -10044,3 +10044,4 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed some typos in the translation files (thanks to Stefan Hofmann).
|
- Fixed some typos in the translation files (thanks to Stefan Hofmann).
|
||||||
- Added some missing locking.
|
- Added some missing locking.
|
||||||
- TS packets with errors are now skipped when parsing for frames.
|
- 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.
|
||||||
|
6
remux.c
6
remux.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "remux.h"
|
||||||
@ -2271,12 +2271,12 @@ int cFrameDetector::Analyze(const uchar *Data, int Length, bool ErrorCheck)
|
|||||||
framesPerSecond = 60.0 / 1.001;
|
framesPerSecond = 60.0 / 1.001;
|
||||||
else {
|
else {
|
||||||
framesPerSecond = DEFAULTFRAMESPERSECOND;
|
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
|
else // audio
|
||||||
framesPerSecond = double(PTSTICKS) / Delta; // PTS of audio frames is always increasing
|
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());
|
dbgframes("\nDelta = %d FPS = %5.2f FPPU = %d NF = %d TRO = %d\n", Delta, framesPerSecond, framesPerPayloadUnit, numPtsValues + 1, parser->IFrameTemporalReferenceOffset());
|
||||||
synced = true;
|
synced = true;
|
||||||
parser->SetDebug(false);
|
parser->SetDebug(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user