From 0812437293fb628fa7bd8d7d478efd24c26b239b Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Thu, 13 Aug 2015 10:25:52 +0900 Subject: [PATCH] dvdspu: Fix event leaks When playing mts files with embedded subtitles, there are few event leaks. Events are supposed to be transfer full. So if not forwarding the event, they need to be freed. https://bugzilla.gnome.org/show_bug.cgi?id=753539 --- gst/dvdspu/gstdvdspu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index f126f340f1..62ee54415f 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -283,7 +283,9 @@ gst_dvd_spu_src_event (GstPad * pad, GstObject * parent, GstEvent * event) if (peer) { res = gst_pad_send_event (peer, event); gst_object_unref (peer); - } + } else + gst_event_unref (event); + return res; } @@ -455,8 +457,10 @@ gst_dvd_spu_video_event (GstPad * pad, GstObject * parent, GstEvent * event) gst_event_copy_segment (event, &seg); - if (seg.format != GST_FORMAT_TIME) + if (seg.format != GST_FORMAT_TIME) { + gst_event_unref (event); return FALSE; + } /* Only print updates if they have an end time (don't print start_time * updates */