mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
dvbsrc: unify exit paths on _start()
This commit is contained in:
parent
33893c5242
commit
ea7c0981ec
1 changed files with 13 additions and 16 deletions
|
@ -1985,32 +1985,29 @@ gst_dvbsrc_start (GstBaseSrc * bsrc)
|
|||
}
|
||||
if (!gst_dvbsrc_tune (src)) {
|
||||
GST_ERROR_OBJECT (src, "Not able to lock on to the dvb channel");
|
||||
gst_dvbsrc_unset_pes_filters (src);
|
||||
close (src->fd_frontend);
|
||||
return FALSE;
|
||||
goto fail;
|
||||
}
|
||||
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;
|
||||
goto fail;
|
||||
}
|
||||
if (!(src->poll = gst_poll_new (TRUE))) {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ_WRITE, (NULL),
|
||||
("Could not create an fd set: %s (%d)", g_strerror (errno), errno));
|
||||
/* unset filters also */
|
||||
gst_dvbsrc_unset_pes_filters (src);
|
||||
close (src->fd_frontend);
|
||||
return FALSE;
|
||||
} else {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
gst_poll_fd_init (&src->poll_fd_dvr);
|
||||
src->poll_fd_dvr.fd = src->fd_dvr;
|
||||
gst_poll_add_fd (src->poll, &src->poll_fd_dvr);
|
||||
gst_poll_fd_ctl_read (src->poll, &src->poll_fd_dvr, TRUE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
fail:
|
||||
gst_dvbsrc_unset_pes_filters (src);
|
||||
close (src->fd_frontend);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue