Fixed overwriting the fps value in a recording's info file

This commit is contained in:
Klaus Schmidinger 2011-06-12 14:24:09 +02:00
parent 72d342ce02
commit b0fd7ed933
4 changed files with 14 additions and 6 deletions

View File

@ -2574,6 +2574,9 @@ Derek Kelly (user.vdr@gmail.com)
for reporting unjustified log entries about changed channel pids
for reporting a problem with the frame detector in case it gets MaxPtsValues values
and stops analyzing even though the incoming data is still garbage
for reporting a problem with the fps value in the info file of a recording being
overwritten in case a recording was interrupted and resumed, and the fps value
could not be determined after resuming recording
Marcel Unbehaun <frostworks@gmx.de>
for adding cRecordingInfo::GetEvent()

View File

@ -6607,7 +6607,7 @@ Video Disk Recorder Revision History
- Avoiding an unecessary call to Recordings.ResetResume() (thanks to Reinhard
Nissl).
2011-06-11: Version 1.7.19
2011-06-12: Version 1.7.19
- Fixed cString's operator=(const char *String) in case the given string is the
same as the existing one (thanks to Dirk Leber).
@ -6640,3 +6640,7 @@ Video Disk Recorder Revision History
- The frame detector now only starts collecting PTS values after it has seen the
first I-frame, otherwise it might get MaxPtsValues values and stop analyzing
even though the incoming data is still garbage (reported by Derek Kelly).
- The info file of a recording is now only overwritten with a new fps value if
that new value is not the default value (thanks to Derek Kelly for reporting a
problem with the fps value being overwritten in case a recording was interrupted
and resumed, and the fps value could not be determined after resuming recording).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recorder.c 2.10 2011/06/12 13:35:20 kls Exp $
* $Id: recorder.c 2.11 2011/06/12 14:16:45 kls Exp $
*/
#include "recorder.h"
@ -133,7 +133,7 @@ void cRecorder::Action(void)
if (!InfoWritten) {
cRecordingInfo RecordingInfo(recordingName);
if (RecordingInfo.Read()) {
if (frameDetector->FramesPerSecond() > 0 && !DoubleEqual(RecordingInfo.FramesPerSecond(), frameDetector->FramesPerSecond())) {
if (frameDetector->FramesPerSecond() > 0 && DoubleEqual(RecordingInfo.FramesPerSecond(), DEFAULTFRAMESPERSECOND) && !DoubleEqual(RecordingInfo.FramesPerSecond(), frameDetector->FramesPerSecond())) {
RecordingInfo.SetFramesPerSecond(frameDetector->FramesPerSecond());
RecordingInfo.Write();
Recordings.UpdateByName(recordingName);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: remux.c 2.56 2011/06/12 13:51:59 kls Exp $
* $Id: remux.c 2.57 2011/06/12 14:24:09 kls Exp $
*/
#include "remux.h"
@ -12,6 +12,7 @@
#include "libsi/si.h"
#include "libsi/section.h"
#include "libsi/descriptor.h"
#include "recording.h"
#include "shutdown.h"
#include "tools.h"
@ -883,8 +884,8 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
else
framesPerSecond = 60.0 / 1.001;
else {
framesPerSecond = 25.0;
dsyslog("unknown frame delta (%d), assuming 25 fps", Delta);
framesPerSecond = DEFAULTFRAMESPERSECOND;
dsyslog("unknown frame delta (%d), assuming %5.2f fps", Delta, DEFAULTFRAMESPERSECOND);
}
}
else // audio