[mythtv] RE: End of recording when not at the end
bjm at lvcm.com
Thu Jan 13 14:02:19 EST 2005
Colin Cross wrote:
> 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?
Fixed. Outstanding analysis, Colin.
It appears that there was an attempt to assume the timeout could
be shorter for local files vs remote files. However there is no
advantage to doing so. Therefore, I made it 50 for all reads.
More information about the mythtv-dev