oops... I broke device settings in OSS

Original commit message from CVS:
oops... I broke device settings in OSS
This commit is contained in:
Ronald S. Bultje 2003-10-28 20:19:13 +00:00
parent c304cd6e1c
commit c4aacdb8e5

View file

@ -608,7 +608,7 @@ gst_osselement_set_property (GObject *object,
case ARG_DEVICE: case ARG_DEVICE:
/* disallow changing the device while it is opened /* disallow changing the device while it is opened
get_property("device") should return the right one */ get_property("device") should return the right one */
if (gst_element_get_state (GST_ELEMENT (oss)) != GST_STATE_NULL) { if (gst_element_get_state (GST_ELEMENT (oss)) == GST_STATE_NULL) {
g_free (oss->device); g_free (oss->device);
oss->device = g_strdup (g_value_get_string (value)); oss->device = g_strdup (g_value_get_string (value));
} }
@ -616,7 +616,7 @@ gst_osselement_set_property (GObject *object,
case ARG_MIXERDEV: case ARG_MIXERDEV:
/* disallow changing the device while it is opened /* disallow changing the device while it is opened
get_property("mixerdev") should return the right one */ get_property("mixerdev") should return the right one */
if (gst_element_get_state (GST_ELEMENT (oss)) != GST_STATE_NULL) { if (gst_element_get_state (GST_ELEMENT (oss)) == GST_STATE_NULL) {
g_free (oss->mixer_dev); g_free (oss->mixer_dev);
oss->mixer_dev = g_strdup (g_value_get_string (value)); oss->mixer_dev = g_strdup (g_value_get_string (value));
} }