mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
sys/dvb/gstdvbsrc.c: Do not go on forever if problem with reading from dvr, rather return NULL.
Original commit message from CVS: * sys/dvb/gstdvbsrc.c: Do not go on forever if problem with reading from dvr, rather return NULL. Handle some cleanup issues of closing filedescriptors when failing to tune or similar.
This commit is contained in:
parent
0cc0c6df9a
commit
1d20eee277
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-01-23 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* sys/dvb/gstdvbsrc.c:
|
||||
Do not go on forever if problem with reading from dvr, rather
|
||||
return NULL.
|
||||
Handle some cleanup issues of closing filedescriptors when
|
||||
failing to tune or similar.
|
||||
|
||||
2008-01-23 Christian Schaller <christian.schaller@collabora.co.uk>
|
||||
|
||||
* gst/rawparse/Makefile.am: Add missing header files to noinst_headers
|
||||
|
|
|
@ -877,6 +877,9 @@ read_device (int fd, int adapter_number, int frontend_number, int size)
|
|||
("Unable to read after %u attempts from device: /dev/dvb/adapter%d/dvr%d (%d)",
|
||||
attempts, adapter_number, frontend_number, errno);
|
||||
}
|
||||
if (attempts % 100 == 0) {
|
||||
return NULL;
|
||||
}
|
||||
} else if (errno == -EINTR) { // poll interrupted
|
||||
;
|
||||
}
|
||||
|
@ -942,13 +945,20 @@ gst_dvbsrc_start (GstBaseSrc * bsrc)
|
|||
gst_dvbsrc_open_frontend (src);
|
||||
if (!gst_dvbsrc_tune (src)) {
|
||||
GST_ERROR_OBJECT (src, "Not able to lock on to the dvb channel");
|
||||
close (src->fd_frontend);
|
||||
return FALSE;
|
||||
}
|
||||
if (!gst_dvbsrc_frontend_status (src)) {
|
||||
/* unset filters also */
|
||||
gst_dvbsrc_unset_pes_filters (src);
|
||||
close (src->fd_frontend);
|
||||
return FALSE;
|
||||
}
|
||||
if (!gst_dvbsrc_open_dvr (src)) {
|
||||
GST_ERROR_OBJECT (src, "Not able to open dvr_device");
|
||||
/* unset filters also */
|
||||
gst_dvbsrc_unset_pes_filters (src);
|
||||
close (src->fd_frontend);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue