summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2009-11-18 14:50:28 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2009-11-18 15:16:18 -0300
commite3e7ba0d1a51d084e5d9cf27d0391ce5a989b834 (patch)
tree4e7b5a96f753f4b7e072c22da7dc9be2932a5860
parent0e6b9e596d88b34098bc069bef1eced3b9b97a47 (diff)
decodebin2: set to buffer less on no-more-pads
When a decodebin2 receives no-more-pads of a group it can set that group's multiqueue buffering thresholds to 'playing' buffering method, avoiding that it buffers too long and cause problems when using with queue2. See the associated bug for details. Fixes #600787
-rw-r--r--gst/playback/gstdecodebin2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index 10cf292ca..db9cc291d 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -266,6 +266,9 @@ static void do_async_done (GstDecodeBin * dbin);
static void type_found (GstElement * typefind, guint probability,
GstCaps * caps, GstDecodeBin * decode_bin);
+static void decodebin_set_queue_size (GstDecodeBin * dbin,
+ GstElement * multiqueue, gboolean preroll);
+
static gboolean gst_decode_bin_autoplug_continue (GstElement * element,
GstPad * pad, GstCaps * caps);
static GValueArray *gst_decode_bin_autoplug_factories (GstElement *
@@ -1874,6 +1877,11 @@ no_more_pads_cb (GstElement * element, GstDecodeChain * chain)
GST_DEBUG_OBJECT (element, "Setting group %p to complete", group);
group->no_more_pads = TRUE;
+ /* this group has prerolled enough to not need more pads,
+ * we can probably set its buffering state to playing now */
+ GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
+ "'playing' buffering mode", group);
+ decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE);
CHAIN_MUTEX_UNLOCK (chain);
EXPOSE_LOCK (chain->dbin);