basetransform: send delayed events earlier

Some elements (such as videorate) might push buffers early,
for instance in in transform_ip. We want events (and in particular
any NEWSEGMENT event) to be pushed before that.

This fixes transmageddon wedging on converting a file starting
with a non zero offset to Ogg.

https://bugzilla.gnome.org/show_bug.cgi?id=660165
This commit is contained in:
Vincent Penquerc'h 2011-09-26 19:52:13 +01:00 committed by Sebastian Dröge
parent 6637d983d3
commit 01172b8126

View file

@ -2517,6 +2517,8 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
if (klass->before_transform)
klass->before_transform (trans, buffer);
gst_base_transform_send_delayed_events (trans);
/* protect transform method and concurrent buffer alloc */
GST_BASE_TRANSFORM_LOCK (trans);
ret = gst_base_transform_handle_buffer (trans, buffer, &outbuf);
@ -2554,8 +2556,6 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
}
trans->priv->processed++;
gst_base_transform_send_delayed_events (trans);
ret = gst_pad_push (trans->srcpad, outbuf);
} else {
gst_buffer_unref (outbuf);