summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--sys/v4l2/gstv4l2object.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 629990ab..486d6236 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 9dfcd343..aff67364 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -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);