dvbsrc: do not autodetect delsys twice

The process is dealt with the first time the adapter is
opened, there is no need to do this again.
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2016-04-11 23:45:22 -07:00
parent 73ebdb888e
commit 34d888220c

View file

@ -1049,6 +1049,7 @@ gst_dvbsrc_init (GstDvbSrc * object)
object->inversion = DEFAULT_INVERSION;
object->stats_interval = DEFAULT_STATS_REPORTING_INTERVAL;
object->delsys = DEFAULT_DELSYS;
object->best_guess_delsys = DEFAULT_DELSYS;
object->pilot = DEFAULT_PILOT;
object->rolloff = DEFAULT_ROLLOFF;
object->stream_id = DEFAULT_STREAM_ID;
@ -1573,6 +1574,11 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object, gboolean writable)
return FALSE;
}
if (object->best_guess_delsys != DEFAULT_DELSYS)
goto delsys_already_autodetected;
/* Perform delivery system autodetection */
GST_DEBUG_OBJECT (object, "Device opened, querying information");
LOOP_WHILE_EINTR (err, ioctl (object->fd_frontend, FE_GET_INFO, &fe_info));
@ -1728,9 +1734,11 @@ gst_dvbsrc_open_frontend (GstDvbSrc * object, gboolean writable)
adapter_structure);
gst_element_post_message (GST_ELEMENT_CAST (object), gst_message_new_element
(GST_OBJECT (object), adapter_structure));
g_free (frontend_dev);
g_free (adapter_name);
delsys_already_autodetected:
g_free (frontend_dev);
return TRUE;
}