mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
gst/gstevent.c: actually break; inside the switch statement
Original commit message from CVS: 2004-02-04 Benjamin Otte <in7y118@public.uni-hamburg.de> * gst/gstevent.c: (_gst_event_free): actually break; inside the switch statement * gst/parse/grammar.y: fix memleak where GValues weren't unset
This commit is contained in:
parent
3945b0600b
commit
92e2c686c4
3 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-02-04 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* gst/gstevent.c: (_gst_event_free):
|
||||
actually break; inside the switch statement
|
||||
* gst/parse/grammar.y:
|
||||
fix memleak where GValues weren't unset
|
||||
|
||||
2004-02-03 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* gst/gststructure.c: (gst_structure_from_string):
|
||||
|
|
|
@ -93,8 +93,10 @@ _gst_event_free (GstEvent* event)
|
|||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_TAG:
|
||||
gst_tag_list_free (event->event_data.structure.structure);
|
||||
break;
|
||||
case GST_EVENT_NAVIGATION:
|
||||
gst_structure_free (event->event_data.structure.structure);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -223,6 +223,8 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
|
|||
{
|
||||
GParamSpec *pspec;
|
||||
gchar *pos = value;
|
||||
GValue v = { 0, };
|
||||
GValue v2 = { 0, };
|
||||
/* parse the string, so the property name is null-terminated an pos points
|
||||
to the beginning of the value */
|
||||
while (!g_ascii_isspace (*pos) && (*pos != '=')) pos++;
|
||||
|
@ -241,8 +243,6 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
|
|||
}
|
||||
gst_parse_unescape (pos);
|
||||
if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), value))) {
|
||||
GValue v = { 0, };
|
||||
GValue v2 = { 0, };
|
||||
g_value_init (&v, G_PARAM_SPEC_VALUE_TYPE(pspec));
|
||||
switch (G_TYPE_FUNDAMENTAL (G_PARAM_SPEC_VALUE_TYPE (pspec))) {
|
||||
case G_TYPE_STRING:
|
||||
|
@ -320,6 +320,10 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
|
|||
|
||||
out:
|
||||
gst_parse_strfree (value);
|
||||
if (G_IS_VALUE (&v))
|
||||
g_value_unset (&v);
|
||||
if (G_IS_VALUE (&v2))
|
||||
g_value_unset (&v2);
|
||||
return;
|
||||
|
||||
error:
|
||||
|
|
Loading…
Reference in a new issue