From 0362d98d94cc4a72e2d797a6a37b54db02b3d288 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 10 Mar 2014 10:00:28 -0300 Subject: [PATCH] queue2: if buffering is disabled while buffering, post 100% message Avoids stall waiting for buffering to reach 100% --- plugins/elements/gstqueue2.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index d04b9b74cf..00dd57296f 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -3385,6 +3385,15 @@ gst_queue2_set_property (GObject * object, break; case PROP_USE_BUFFERING: queue->use_buffering = g_value_get_boolean (value); + if (!queue->use_buffering && queue->is_buffering) { + GstMessage *msg = gst_message_new_buffering (GST_OBJECT_CAST (queue), + 100); + + GST_DEBUG_OBJECT (queue, "Disabled buffering while buffering, " + "posting 100%% message"); + queue->is_buffering = FALSE; + gst_element_post_message (GST_ELEMENT_CAST (queue), msg); + } break; case PROP_USE_RATE_ESTIMATE: queue->use_rate_estimate = g_value_get_boolean (value);