vorbisdec: Unref events if the parent element disappeared

This commit is contained in:
Sebastian Dröge 2011-04-08 15:00:58 +02:00
parent 5e9cfc6355
commit 0688521103

View file

@ -410,8 +410,10 @@ vorbis_dec_src_event (GstPad * pad, GstEvent * event)
GstVorbisDec *dec;
dec = GST_VORBIS_DEC (gst_pad_get_parent (pad));
if (G_UNLIKELY (dec == NULL))
if (G_UNLIKELY (dec == NULL)) {
gst_event_unref (event);
return FALSE;
}
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK: