rsvgoverlay: fix crash due to double adapter unref

This commit is contained in:
Tim-Philipp Müller 2012-03-15 17:26:14 +00:00
parent d405ea2e63
commit e1e827d364

View file

@ -336,7 +336,7 @@ gst_rsvg_overlay_data_sink_event (GstPad * pad, GstEvent * event)
GST_RSVG_UNLOCK (overlay);
}
case GST_EVENT_FLUSH_START:
case GST_EVENT_FLUSH_STOP:
gst_adapter_clear (overlay->adapter);
break;
@ -436,10 +436,11 @@ gst_rsvg_overlay_stop (GstBaseTransform * btrans)
if (overlay->handle) {
g_object_unref (overlay->handle);
g_object_unref (overlay->adapter);
overlay->handle = NULL;
}
gst_adapter_clear (overlay->adapter);
return TRUE;
}