flacdec: fix event leak
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 22 Jul 2010 14:24:43 +0000 (16:24 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 22 Jul 2010 14:25:38 +0000 (16:25 +0200)
ext/flac/gstflacdec.c

index e20c3f26cadf826366a75378b7cce5848d90af20..ae11f273e70a5c76d67d2320f13fc25ab7a941a5 100644 (file)
@@ -1269,6 +1269,8 @@ gst_flac_dec_sink_event (GstPad * pad, GstEvent * event)
         /* prepare generic newsegment event, for some reason our metadata
          * callback where we usually set this up is not being called in
          * push mode */
+        if (dec->start_segment)
+          gst_event_unref (dec->start_segment);
         dec->start_segment = gst_event_new_new_segment (FALSE, 1.0,
             GST_FORMAT_TIME, 0, -1, 0);