diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-09 20:54:24 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-09 20:54:24 +0000 |
commit | 2ca1bfc5ab3719c351427596033f6edd4d4f9d1d (patch) | |
tree | 25217ac2191f047e591380ef565eb90003f0ae6e /sys/oss | |
parent | 741aa2e10837031dd5cf27e1ac45381306f623d3 (diff) |
Fix device probing from multiple childs. It's done once in the parent class only now, but the childs do get the corre...
Original commit message from CVS:
Fix device probing from multiple childs. It's done once in the parent class only now, but the childs do get the correct values. Also fixes an incorrect succesful state change if we opened a v4l device that doesn't have the capabilities that are needed by the plugin.
Diffstat (limited to 'sys/oss')
-rw-r--r-- | sys/oss/gstosselement.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c index 6d1e151d..9e1814a5 100644 --- a/sys/oss/gstosselement.c +++ b/sys/oss/gstosselement.c @@ -207,6 +207,7 @@ gst_osselement_class_probe_devices (GstOssElementClass *klass, gboolean check) { static gboolean init = FALSE; + static GList *device_combinations; if (!init && !check) { gchar *dsp_base[] = { "/dev/dsp", "/dev/sound/dsp", NULL }; @@ -214,12 +215,11 @@ gst_osselement_class_probe_devices (GstOssElementClass *klass, GstOssDeviceCombination devices[16]; gint n; - while (klass->device_combinations) { - GList *item = klass->device_combinations; + while (device_combinations) { + GList *item = device_combinations; GstOssDeviceCombination *combi = item->data; - klass->device_combinations = - g_list_remove (klass->device_combinations, item); + device_combinations = g_list_remove (device_combinations, item); g_free (combi->dsp); g_free (combi->mixer); @@ -261,8 +261,7 @@ gst_osselement_class_probe_devices (GstOssElementClass *klass, combi->mixer = devices[n].mixer; devices[n].dsp = devices[n].mixer = NULL; - klass->device_combinations = - g_list_append (klass->device_combinations, combi); + device_combinations = g_list_append (device_combinations, combi); } } @@ -278,6 +277,8 @@ gst_osselement_class_probe_devices (GstOssElementClass *klass, init = TRUE; } + klass->device_combinations = device_combinations; + return init; } |