summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2object.c
diff options
context:
space:
mode:
authorMike Ruprecht <cmaiku@gmail.com>2008-08-23 15:33:49 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-08-23 15:33:49 +0000
commite14c307e2d6245cf65e0817577216fc7a5918229 (patch)
tree43a7d483d72d28fbaccf0dbda34680ad950db384 /sys/v4l2/gstv4l2object.c
parent1e10b33f15e928ff7ea80c05213be2a54f6ede0c (diff)
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.
Diffstat (limited to 'sys/v4l2/gstv4l2object.c')
-rw-r--r--sys/v4l2/gstv4l2object.c8
1 files changed, 4 insertions, 4 deletions
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);