From: Jan Schmidt Date: Mon, 5 Jan 2004 16:25:31 +0000 (+0000) Subject: gst/gstcaps.c: Move the poisoning to allow a NULL structure X-Git-Tag: BRANCH-RELEASE-0_7_4-ROOT~187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1d837b9d55f87bbcb21c139879ae65a1abe491c;p=platform%2Fupstream%2Fgstreamer.git gst/gstcaps.c: Move the poisoning to allow a NULL structure Original commit message from CVS: * gst/gstcaps.c: (gst_caps_append_structure): Move the poisoning to allow a NULL structure * gst/gstevent.c: (_gst_event_free): When freeing a navigation event, free the structure also --- diff --git a/ChangeLog b/ChangeLog index 9f8e310..e415f7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-01-06 Jan Schmidt + + * gst/gstcaps.c: (gst_caps_append_structure): + Move the poisoning to allow a NULL structure + * gst/gstevent.c: (_gst_event_free): + When freeing a navigation event, free the structure + also + 2004-01-04 David Schleef * gst/elements/gsttee.c: (gst_tee_init), (gst_tee_request_new_pad): diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 8724ce1..0b9be9f 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -240,10 +240,10 @@ void gst_caps_append_structure (GstCaps *caps, GstStructure *structure) { g_return_if_fail(caps != NULL); + if (structure){ #ifdef USE_POISONING - STRUCTURE_POISON (structure); + STRUCTURE_POISON (structure); #endif - if (structure){ g_ptr_array_add (caps->structs, structure); } } diff --git a/gst/gstevent.c b/gst/gstevent.c index 56e8a15..22fb2b2 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -93,6 +93,8 @@ _gst_event_free (GstEvent* event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_TAG: gst_tag_list_free (event->event_data.structure.structure); + case GST_EVENT_NAVIGATION: + gst_structure_free (event->event_data.structure.structure); default: break; }