basetransform: don't unref trans until the function is done using it

trans->priv->force_alloc = FALSE would crash if the ref held is the last

https://bugzilla.gnome.org/show_bug.cgi?id=648215
This commit is contained in:
Havard Graff 2011-04-14 10:15:26 +02:00 committed by Tim-Philipp Müller
parent 60bbb9c24f
commit 38dcd41b97

View file

@ -1963,7 +1963,6 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
sink_suggest = NULL;
}
gst_object_unref (trans);
if (sink_suggest)
gst_caps_unref (sink_suggest);
@ -1974,6 +1973,7 @@ gst_base_transform_buffer_alloc (GstPad * pad, guint64 offset, guint size,
trans->priv->force_alloc = FALSE;
}
gst_object_unref (trans);
return res;
/* ERRORS */