diff options
author | Austin Lund <austin.lund@gmail.com> | 2009-06-19 20:13:53 +1000 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-16 21:08:27 +0200 |
commit | b9890a2bf724cafb561c47df2ff48cc3ae4f0e89 (patch) | |
tree | f55cdf5a8df412ef8952fb1b086318e5c34f30b0 /sys/dvb | |
parent | 2db8d6ea0bc3b6bd4eab91b167c5af790e1a6e0f (diff) | |
download | gst-plugins-bad-b9890a2bf724cafb561c47df2ff48cc3ae4f0e89.tar.gz gst-plugins-bad-b9890a2bf724cafb561c47df2ff48cc3ae4f0e89.tar.bz2 gst-plugins-bad-b9890a2bf724cafb561c47df2ff48cc3ae4f0e89.zip |
Increased the length of time for tuning in gstdvbsrc.c.
Some devices take a while to tune and 500ms was too short to detect
successful tuning. As well as waiting for 5 seconds each 100ms the
status is checked and the loop is broken out of when tuning has suceeded.
Diffstat (limited to 'sys/dvb')
-rw-r--r-- | sys/dvb/gstdvbsrc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index 37b46f42..fd76a4ea 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -1326,13 +1326,15 @@ gst_dvbsrc_tune (GstDvbSrc * object) #endif g_warning ("Error tuning channel: %s", strerror (errno)); } - for (i = 0; i < 5; i++) { + for (i = 0; i < 50; i++) { usleep (100000); if (ioctl (object->fd_frontend, FE_READ_STATUS, &status) == -1) { perror ("FE_READ_STATUS"); break; } GST_LOG_OBJECT (object, "status == 0x%02x", status); + if (status & FE_HAS_LOCK) + break; } if (status & FE_HAS_LOCK) break; |