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
This commit is contained in:
Vineeth TM 2015-08-13 10:25:52 +09:00 committed by Tim-Philipp Müller
parent 88f85f6595
commit 0812437293

View file

@ -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 */