queue2: if buffering is disabled while buffering, post 100% message

Avoids stall waiting for buffering to reach 100%
This commit is contained in:
Thiago Santos 2014-03-10 10:00:28 -03:00
parent dc8f0932fe
commit 0362d98d94

View file

@ -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);