event: fix some event leaks
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 7 Jun 2011 10:06:22 +0000 (12:06 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 7 Jun 2011 10:06:22 +0000 (12:06 +0200)
ext/libvisual/visual.c
gst-libs/gst/rtp/gstbasertppayload.c

index 618679a..481ee10 100644 (file)
@@ -504,6 +504,7 @@ gst_visual_sink_event (GstPad * pad, GstEvent * event)
 
       gst_event_parse_caps (event, &caps);
       res = gst_visual_sink_setcaps (pad, caps);
+      gst_event_unref (event);
       break;
     }
     case GST_EVENT_SEGMENT:
index aeef424..8b87f68 100644 (file)
@@ -382,6 +382,8 @@ gst_basertppayload_event_default (GstBaseRTPPayload * basertppayload,
       basertppayload_class = GST_BASE_RTP_PAYLOAD_GET_CLASS (basertppayload);
       if (basertppayload_class->set_caps)
         res = basertppayload_class->set_caps (basertppayload, caps);
+
+      gst_event_unref (event);
       break;
     }
     case GST_EVENT_SEGMENT: