diff options
author | Vineeth TM <vineeth.tm@samsung.com> | 2015-08-13 10:25:52 +0900 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2015-08-13 14:38:03 +0100 |
commit | 0812437293fb628fa7bd8d7d478efd24c26b239b (patch) | |
tree | 791a9a22ee97075e400208ef6307b06ec00834c7 /gst | |
parent | 88f85f6595689d147036ae6127c7a2ff4f73dcbd (diff) | |
download | gstreamer-plugins-bad-0812437293fb628fa7bd8d7d478efd24c26b239b.tar.gz |
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
Diffstat (limited to 'gst')
-rw-r--r-- | gst/dvdspu/gstdvdspu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index f126f340f..62ee54415 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 */ |