===================================================================
RCS file: ./RCS/recording.c
retrieving revision 2.26
diff -u -b -r2.26 ./recording.c
--- ./recording.c	2011/02/27 13:35:20	2.26
+++ ./recording.c	2011/03/20 12:25:00
@@ -1270,7 +1270,7 @@
 {
   fileName = AddDirectory(RecordingFileName, IsPesRecording ? MARKSFILESUFFIX ".vdr" : MARKSFILESUFFIX);
   framesPerSecond = FramesPerSecond;
-  lastUpdate = 0;
+  nextUpdate = 0;
   lastFileTime = -1; // the first call to Load() must take place!
   return Update();
 }
@@ -1278,11 +1278,27 @@
 bool cMarks::Update(void)
 {
   time_t t = time(NULL);
-  if (t - lastUpdate > MARKSUPDATEDELTA) {
-     lastUpdate = t;
-     t = LastModifiedTime(fileName);
-     if (t > lastFileTime) {
-        lastFileTime = t;
+  if (t > nextUpdate) {
+     time_t LastModified = LastModifiedTime(fileName);
+     int d;
+     if (LastModified > 0) // the file exists
+        d = t - LastModified;
+     else { // the file doesn't exist
+        if (lastFileTime <= 0) {
+           lastFileTime = t - 2; // -2 makes sure we don't miss an update within the very same second
+           LastModified = t; // make sure we run into the actual Load() below
+           }
+        d = t - lastFileTime;
+        }
+     if (d < 60)
+        d = 1; // check frequently if the file has just been modified
+     else if (d < 3600)
+        d = 10; // older files are checked less frequently
+     else
+        d /= 360; // phase out checking for very old files
+     nextUpdate = t + d;
+     if (LastModified > lastFileTime) {
+        lastFileTime = LastModified;
         cMutexLock MutexLock(&MutexMarkFramesPerSecond);
         MarkFramesPerSecond = framesPerSecond;
         if (cConfig<cMark>::Load(fileName)) {
===================================================================
RCS file: ./RCS/recording.h
retrieving revision 2.16
diff -u -b -r2.16 ./recording.h
--- ./recording.h	2011/02/27 12:48:21	2.16
+++ ./recording.h	2011/03/20 10:33:30
@@ -192,7 +192,7 @@
 private:
   cString fileName;
   double framesPerSecond;
-  time_t lastUpdate;
+  time_t nextUpdate;
   time_t lastFileTime;
 public:
   bool Load(const char *RecordingFileName, double FramesPerSecond = DEFAULTFRAMESPERSECOND, bool IsPesRecording = false);
