dvbsrc: abort at open frontend failure
This commit is contained in:
parent
43487482e5
commit
d0e553a6d3
@ -1957,7 +1957,10 @@ gst_dvbsrc_change_state (GstElement * element, GstStateChange transition)
|
|||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
/* open frontend then close it again, just so caps sent */
|
/* open frontend then close it again, just so caps sent */
|
||||||
gst_dvbsrc_open_frontend (src, FALSE);
|
if (!gst_dvbsrc_open_frontend (src, FALSE)) {
|
||||||
|
GST_ERROR_OBJECT (src, "Could not open frontend device");
|
||||||
|
ret = GST_STATE_CHANGE_FAILURE;
|
||||||
|
}
|
||||||
if (src->fd_frontend) {
|
if (src->fd_frontend) {
|
||||||
close (src->fd_frontend);
|
close (src->fd_frontend);
|
||||||
}
|
}
|
||||||
@ -1975,7 +1978,10 @@ gst_dvbsrc_start (GstBaseSrc * bsrc)
|
|||||||
{
|
{
|
||||||
GstDvbSrc *src = GST_DVBSRC (bsrc);
|
GstDvbSrc *src = GST_DVBSRC (bsrc);
|
||||||
|
|
||||||
gst_dvbsrc_open_frontend (src, TRUE);
|
if (!gst_dvbsrc_open_frontend (src, TRUE)) {
|
||||||
|
GST_ERROR_OBJECT (src, "Could not open frontend device");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
if (!gst_dvbsrc_tune (src)) {
|
if (!gst_dvbsrc_tune (src)) {
|
||||||
GST_ERROR_OBJECT (src, "Not able to lock on to the dvb channel");
|
GST_ERROR_OBJECT (src, "Not able to lock on to the dvb channel");
|
||||||
gst_dvbsrc_unset_pes_filters (src);
|
gst_dvbsrc_unset_pes_filters (src);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user