decodebin: During exposing of pads don't set the multiqueue limits multiple times...
authorSebastian Dröge <sebastian@centricular.com>
Thu, 20 Feb 2014 14:36:47 +0000 (15:36 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 22 Feb 2014 23:10:01 +0000 (00:10 +0100)
Instead just set them once in the very end to the correct values.

gst/playback/gstdecodebin2.c

index f32e026..1d8401a 100644 (file)
@@ -2642,12 +2642,6 @@ 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,
-      (group->parent ? group->parent->seekable : TRUE));
   CHAIN_MUTEX_UNLOCK (chain);
 
   EXPOSE_LOCK (chain->dbin);
@@ -3061,12 +3055,6 @@ multi_queue_overrun_cb (GstElement * queue, GstDecodeGroup * group)
       queue);
 
   group->overrun = 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,
-      (group->parent ? group->parent->seekable : TRUE));
 
   /* FIXME: We should make sure that everything gets exposed now
    * even if child chains are not complete because the will never
@@ -4088,9 +4076,6 @@ gst_decode_chain_expose (GstDecodeChain * chain, GList ** endpads,
 
   dbin = group->dbin;
 
-  /* configure queues for playback */
-  decodebin_set_queue_size (dbin, group->multiqueue, FALSE, TRUE);
-
   /* we can now disconnect any overrun signal, which is used to expose the
    * group. */
   if (group->overrunsig) {