diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-25 14:32:11 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-01-25 14:32:11 +0100 |
commit | a906cd52df9795406ace1403687ef4b4f47bca64 (patch) | |
tree | 529ad6262b77987fb9904e2601166a0c2fecf1fd | |
parent | 79dad980cfd29e43ab19ab6264469fc5b49c9dec (diff) | |
download | vdr-a906cd52df9795406ace1403687ef4b4f47bca64.tar.gz vdr-a906cd52df9795406ace1403687ef4b4f47bca64.tar.bz2 |
The index file is now closed after initially reading it if it is older than 3600 seconds
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | recording.c | 10 |
2 files changed, 7 insertions, 4 deletions
@@ -7546,3 +7546,4 @@ Video Disk Recorder Revision History - Fixed a leftover line in case a two line subtitle was followed by a one line subtitle on the dvbhddevice in "high level" OSD mode. - Returning 0 from cDvbSdFfDevice::NumProvidedSystems() if option --outputonly is given. +- The index file is now closed after initially reading it if it is older than 3600 seconds. diff --git a/recording.c b/recording.c index 9cd05223..c2803255 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.83 2013/01/16 14:17:44 kls Exp $ + * $Id: recording.c 2.84 2013/01/25 14:31:04 kls Exp $ */ #include "recording.h" @@ -1743,12 +1743,14 @@ cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording, b esyslog("ERROR: can't read from file '%s'", *fileName); free(index); index = NULL; - close(f); - f = -1; } - // we don't close f here, see CatchUp()! else if (isPesRecording) ConvertFromPes(index, size); + if (!index || time(NULL) - buf.st_mtime >= MININDEXAGE) { + close(f); + f = -1; + } + // otherwise we don't close f here, see CatchUp()! } else LOG_ERROR_STR(*fileName); |