Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 9c15dda2feceb745cd7809270174b341 > files > 14

vdr-plugin-actuator-1.1.1-6mdv2010.0.i586.rpm

--- recorder.c.steerable	2005-09-20 21:22:00.002214780 +0200
+++ recorder.c	2005-10-30 10:59:44.285101827 +0100
@@ -98,10 +98,12 @@
 void cFileWriter::Action(void)
 {
   time_t t = time(NULL);
+  time_t m = MAXBROKENTIMEOUT * 10;  //give more time to first packet
   while (Running()) {
         int Count;
         uchar *p = remux->Get(Count, &pictureType);
         if (p) {
+           m = MAXBROKENTIMEOUT;
            if (!Running() && pictureType == I_FRAME) // finish the recording before the next 'I' frame
               break;
            if (NextFile()) {
@@ -128,7 +130,7 @@
               break;
            t = time(NULL);
            }
-        else if (time(NULL) - t > MAXBROKENTIMEOUT) {
+        else if (time(NULL) - t > m) {
            esyslog("ERROR: video data stream broken");
            cThread::EmergencyExit(true);
            t = time(NULL);