diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2010-12-22 19:06:56 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-12-22 20:19:15 +0100 |
commit | e443ae6000ddfd4d469c6614914fd700396558b1 (patch) | |
tree | 452425ad9f0ca84b920708ec6fbe1cc887d2cf7d | |
parent | c76a6ef8ea47f2517c641da6f117df4feb1afe14 (diff) |
oggdemux: Don't use gst_pad_alloc_buffer()
allocate buffers using gst_buffer_new_and_alloc() instead of
gst_pad_alloc_buffer_and_set_caps(), as the first one will
cause the pad to block, and we don't want that since that will
prevent subsequent pads from being fed if a block occurs at
start, when all pads must be fed for playback to start.
This fixes autoplugging of the tiger element and other things.
https://bugzilla.gnome.org/show_bug.cgi?id=637822
-rw-r--r-- | ext/ogg/gstoggdemux.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 8da7288e7..89707832e 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -567,10 +567,9 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, goto empty_packet; } - ret = - gst_pad_alloc_buffer_and_set_caps (GST_PAD_CAST (pad), - GST_BUFFER_OFFSET_NONE, packet->bytes - offset - trim, - GST_PAD_CAPS (pad), &buf); + buf = gst_buffer_new_and_alloc (packet->bytes - offset - trim); + gst_buffer_set_caps (buf, GST_PAD_CAPS (pad)); + ret = GST_FLOW_OK; /* combine flows */ cret = gst_ogg_demux_combine_flows (ogg, pad, ret); |