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.
This commit is contained in:
Austin Lund 2009-06-19 20:13:53 +10:00 committed by Sebastian Dröge
parent 2db8d6ea0b
commit b9890a2bf7

View file

@ -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;