v4l2radio: Free videodev string before replacing it
This commit is contained in:
parent
54349be39f
commit
0b9cf7e47d
@ -384,6 +384,7 @@ gst_v4l2radio_init (GstV4l2Radio * filter, GstV4l2RadioClass * gclass)
|
|||||||
gst_v4l2radio_get_input, gst_v4l2radio_set_input, NULL);
|
gst_v4l2radio_get_input, gst_v4l2radio_set_input, NULL);
|
||||||
|
|
||||||
filter->v4l2object->frequency = DEFAULT_FREQUENCY;
|
filter->v4l2object->frequency = DEFAULT_FREQUENCY;
|
||||||
|
g_free (filter->v4l2object->videodev);
|
||||||
filter->v4l2object->videodev = g_strdup (DEFAULT_PROP_DEVICE);
|
filter->v4l2object->videodev = g_strdup (DEFAULT_PROP_DEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -521,6 +522,7 @@ gst_v4l2radio_set_property (GObject * object, guint prop_id,
|
|||||||
gint frequency;
|
gint frequency;
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case ARG_DEVICE:
|
case ARG_DEVICE:
|
||||||
|
g_free (radio->v4l2object->videodev);
|
||||||
radio->v4l2object->videodev =
|
radio->v4l2object->videodev =
|
||||||
g_strdup ((gchar *) g_value_get_string (value));
|
g_strdup ((gchar *) g_value_get_string (value));
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user