After some distraction setting up a second backend to debug on, I've tracked down the problem I was having with live recording playback ending prematurely. The problem is that the timeout in RingBuffer:safe_read is 0.9 seconds, which is shorter than the 1 second write period in RingBuffer:DiskLoop. If I skip to near the end of a live recording, say within 10 seconds, zerocnt ends up as high as 21 at the end of safe_read (after I increased the safe_read zerocnt limit to 50 for normalfiles). The attached one-line patch changes zerocnt to 30 for a timeout of 1.8 seconds, which is almost double the write period. Is there something else I'm missing that is supposed to prevent the RingBuffer from trying to read so close to the end?
Index: libs/libmythtv/RingBuffer.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/RingBuffer.cpp,v
retrieving revision 1.106
diff -u -r1.106 RingBuffer.cpp
--- libs/libmythtv/RingBuffer.cpp	22 Oct 2004 09:32:54 -0000	1.106
+++ libs/libmythtv/RingBuffer.cpp	13 Jan 2005 03:07:59 -0000
@@ -584,7 +584,7 @@
                 break;
 
             zerocnt++;
-            if ((normalfile && zerocnt > 15) ||
+            if ((normalfile && zerocnt > 30) ||
                 zerocnt >= 50) // 3 second timeout with usleep(60000)
             {
                 break;
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to