audioencoder: don't leak event
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 27 Feb 2012 12:08:36 +0000 (13:08 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 27 Feb 2012 12:08:36 +0000 (13:08 +0100)
gst-libs/gst/audio/gstaudioencoder.c

index f54ece8fc0dcab55d157b00c8e988a35497a49ef..13c523e66aa49cd3a9fff6b15d9b9c5612be3377 100644 (file)
@@ -1395,8 +1395,10 @@ gst_audio_encoder_sink_event (GstPad * pad, GstObject * parent,
 
   if (klass->event)
     ret = klass->event (enc, event);
-  else
+  else {
+    gst_event_unref (event);
     ret = FALSE;
+  }
 
   GST_DEBUG_OBJECT (enc, "event result %d", ret);