[mythtv-users] : how to trace "wait for 2 seconds..." problem
Dave Weisbeck
davemw at shaw.ca
Wed Nov 12 00:33:41 EST 2003
From: "Stefan Frank" <sfr+lists at 6913304088794.gnuu.de>
>
> Hi Dave,
>
<snip>
>
> Sounds like i'm in the same boat :-(. I'm also using a VIA chipset based
> mainboard (Asus CUV4X-D and a PVR350) Dave, could you post the changes
> you made as a patch? I'd like to try them out on my system.
>
> Bye, Stefan
>
Sure. Every once in a while I get a crash when exiting and going back to
LiveTV, but I've seen no other weird behaviour if the playback freeze
doesn't occur.
Index: libs/libmythtv/mpegrecorder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/mpegrecorder.cpp,v
retrieving revision 1.24
diff -u -r1.24 mpegrecorder.cpp
--- libs/libmythtv/mpegrecorder.cpp 2 Oct 2003 07:43:36 -0000 1.24
+++ libs/libmythtv/mpegrecorder.cpp 12 Nov 2003 05:28:44 -0000
@@ -269,7 +269,7 @@
return;
}
- readfd = open(videodevice.ascii(), O_RDWR);
+ readfd = open(videodevice.ascii(), O_RDWR|O_NONBLOCK);
if (readfd <= 0)
{
cerr << "Can't open video device: " << videodevice << endl;
@@ -306,11 +306,11 @@
}
if (readfd < 0)
- readfd = open(videodevice.ascii(), O_RDWR);
+ readfd = open(videodevice.ascii(), O_RDWR|O_NONBLOCK);
ret = read(readfd, buffer, 256000);
- if (ret < 0)
+ if (ret < 0 && ret != -EAGAIN)
{
cerr << "error reading from: " << videodevice << endl;
perror("read");
More information about the mythtv-users
mailing list