mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
v4l2radio: Free videodev string before replacing it
This commit is contained in:
parent
54349be39f
commit
0b9cf7e47d
1 changed files with 2 additions and 0 deletions
|
@ -384,6 +384,7 @@ gst_v4l2radio_init (GstV4l2Radio * filter, GstV4l2RadioClass * gclass)
|
|||
gst_v4l2radio_get_input, gst_v4l2radio_set_input, NULL);
|
||||
|
||||
filter->v4l2object->frequency = DEFAULT_FREQUENCY;
|
||||
g_free (filter->v4l2object->videodev);
|
||||
filter->v4l2object->videodev = g_strdup (DEFAULT_PROP_DEVICE);
|
||||
}
|
||||
|
||||
|
@ -521,6 +522,7 @@ gst_v4l2radio_set_property (GObject * object, guint prop_id,
|
|||
gint frequency;
|
||||
switch (prop_id) {
|
||||
case ARG_DEVICE:
|
||||
g_free (radio->v4l2object->videodev);
|
||||
radio->v4l2object->videodev =
|
||||
g_strdup ((gchar *) g_value_get_string (value));
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue