From 23691bd7a7dbf51c0491e148add5b9583cc78c62 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 16 Aug 2013 12:54:38 +0200 Subject: [PATCH] queue2: update buffering when changing capacity When the capacity of the queue changes, make sure we post an updated buffering message because we might suddenly have completed the buffering stage. --- plugins/elements/gstqueue2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index 3f12939240..bad50c2386 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -3148,8 +3148,10 @@ gst_queue2_change_state (GstElement * element, GstStateChange transition) /* changing the capacity of the queue must wake up * the _chain function, it might have more room now * to store the buffer/event in the queue */ -#define QUEUE_CAPACITY_CHANGE(q)\ - GST_QUEUE2_SIGNAL_DEL (queue); +#define QUEUE_CAPACITY_CHANGE(q) \ + GST_QUEUE2_SIGNAL_DEL (queue); \ + if (queue->use_buffering) \ + update_buffering (queue); /* Changing the minimum required fill level must * wake up the _loop function as it might now