diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-12-23 13:32:26 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-12-23 13:32:26 +0100 |
commit | d6efa529c906d034f2e7561a4cdc93b81ca80be0 (patch) | |
tree | 6081294d59b6fc1d6dca23aa00a72045a134d2b1 | |
parent | ea951daa44653355b19e2e11ab7bf15198e1e78a (diff) | |
download | vdr-d6efa529c906d034f2e7561a4cdc93b81ca80be0.tar.gz vdr-d6efa529c906d034f2e7561a4cdc93b81ca80be0.tar.bz2 |
Fixed replay stuttering close to the end of an ongoing recording
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | recording.c | 8 |
3 files changed, 8 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e771aa61..d21f8844 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1453,6 +1453,7 @@ Andreas Regel <andreas.regel@gmx.de> for making cDevice::AddPid() store the stream type of the given pid for adding cFont::FontName() and cFont::Size() for writing the dvbhddevice plugin + for reporting replay stuttering close to the end of an ongoing recording Thomas Bergwinkl <Thomas.Bergwinkl@vr-web.de> for fixing the validity check for channel IDs, because some providers use TIDs @@ -7454,3 +7454,5 @@ Video Disk Recorder Revision History mcRecordingInfo, mcPluginSetup, mcSetupOsd, mcSetupEpg, mcSetupDvb, mcSetupLnb, mcSetupCam, mcSetupRecord, mcSetupReplay, mcSetupMisc and mcSetupPlugins. - Updated the Italian OSD texts (thanks to Diego Pierotto). +- Fixed replay stuttering close to the end of an ongoing recording (reported by Andreas + Regel). diff --git a/recording.c b/recording.c index 87ca8efe..02696cca 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 2.78 2012/12/06 09:35:13 kls Exp $ + * $Id: recording.c 2.79 2012/12/23 13:30:37 kls Exp $ */ #include "recording.h" @@ -1824,7 +1824,9 @@ bool cIndexFile::CatchUp(int Index) // returns true unless something really goes wrong, so that 'index' becomes NULL if (index && f >= 0) { cMutexLock MutexLock(&mutex); - for (int i = 0; i <= MAXINDEXCATCHUP && (Index < 0 || Index > last); i++) { + // Note that CatchUp() is triggered even if Index is 'last' (and thus valid). + // This is done to make absolutely sure we don't miss any data at the very end. + for (int i = 0; i <= MAXINDEXCATCHUP && (Index < 0 || Index >= last); i++) { struct stat buf; if (fstat(f, &buf) == 0) { if (!IsInIndexList(this)) { @@ -1869,7 +1871,7 @@ bool cIndexFile::CatchUp(int Index) } else LOG_ERROR_STR(*fileName); - if (Index <= last) + if (Index < last) break; cCondWait::SleepMs(1000); } |