mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
sys/v4l2/gstv4l2object.c: Reprobe devices again instead of taking a cached list as new devices could've been plugged ...
Original commit message from CVS: Patch by: Mike Ruprecht <cmaiku at gmail dot com> * sys/v4l2/gstv4l2object.c: (gst_v4l2_class_probe_devices): Reprobe devices again instead of taking a cached list as new devices could've been plugged in. Fixes bug #549062.
This commit is contained in:
parent
1e10b33f15
commit
e14c307e2d
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-08-23 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
Patch by: Mike Ruprecht <cmaiku at gmail dot com>
|
||||
|
||||
* sys/v4l2/gstv4l2object.c: (gst_v4l2_class_probe_devices):
|
||||
Reprobe devices again instead of taking a cached list as new
|
||||
devices could've been plugged in. Fixes bug #549062.
|
||||
|
||||
2008-08-22 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* gst/autodetect/Makefile.am:
|
||||
|
|
|
@ -75,7 +75,7 @@ gst_v4l2_class_probe_devices (GstElementClass * klass, gboolean check,
|
|||
static gboolean init = FALSE;
|
||||
static GList *devices = NULL;
|
||||
|
||||
if (!init && !check) {
|
||||
if (!check) {
|
||||
const gchar *dev_base[] = { "/dev/video", "/dev/v4l2/video", NULL };
|
||||
gint base, n, fd;
|
||||
|
||||
|
@ -83,7 +83,7 @@ gst_v4l2_class_probe_devices (GstElementClass * klass, gboolean check,
|
|||
GList *item = devices;
|
||||
gchar *device = item->data;
|
||||
|
||||
devices = g_list_remove (devices, item);
|
||||
devices = g_list_remove (devices, device);
|
||||
g_free (device);
|
||||
}
|
||||
|
||||
|
@ -439,8 +439,8 @@ gst_v4l2_set_defaults (GstV4l2Object * v4l2object)
|
|||
gst_tuner_set_channel (tuner, channel);
|
||||
} else {
|
||||
channel =
|
||||
GST_TUNER_CHANNEL (gst_tuner_get_channel (GST_TUNER (v4l2object->
|
||||
element)));
|
||||
GST_TUNER_CHANNEL (gst_tuner_get_channel (GST_TUNER
|
||||
(v4l2object->element)));
|
||||
if (channel) {
|
||||
g_free (v4l2object->channel);
|
||||
v4l2object->channel = g_strdup (channel->label);
|
||||
|
|
Loading…
Reference in a new issue