decodebin2: reflow configuring new multiqueue instance
authorStefan Kost <ensonic@users.sf.net>
Mon, 14 Mar 2011 08:05:34 +0000 (10:05 +0200)
committerStefan Kost <ensonic@users.sf.net>
Mon, 14 Mar 2011 08:43:42 +0000 (10:43 +0200)
Use a single g_object_set to configure the new multiqueue instance. Also don't
needlessly set "use-buffering" if it is the default.

gst/playback/gstdecodebin2.c

index 882d53f8040096df9cc7e34726801eb95ffca79f..998d15becef16ad28ef1148bbb33b0608e9bc669 100644 (file)
@@ -2696,10 +2696,12 @@ gst_decode_group_new (GstDecodeBin * dbin, GstDecodeChain * parent)
   if (G_UNLIKELY (!group->multiqueue))
     goto missing_multiqueue;
 
-  g_object_set (mq, "use-buffering", dbin->use_buffering, NULL);
+  /* default is for use-buffering is FALSE */
   if (dbin->use_buffering) {
-    g_object_set (mq, "low-percent", dbin->low_percent, NULL);
-    g_object_set (mq, "high-percent", dbin->high_percent, NULL);
+    g_object_set (mq,
+        "use-buffering", TRUE,
+        "low-percent", dbin->low_percent,
+        "high-percent", dbin->high_percent, NULL);
   }
 
   /* configure queue sizes for preroll */