Commit 783b4ba2 authored by Wim Taymans's avatar Wim Taymans
Browse files

rtpjitterbuffer: refuse serialied query when buffering

When we are buffering, we can't block and wait for the serialized query
to complete because the jitterbuffer will not try to forward the query
while buffering. Instead, just refuse the query.
parent 233e9e64
......@@ -2518,7 +2518,8 @@ pop_and_push_next (GstRtpJitterBuffer * jitterbuffer, guint seqnum)
break;
case ITEM_TYPE_LOST:
case ITEM_TYPE_EVENT:
GST_DEBUG_OBJECT (jitterbuffer, "Pushing event %d", seqnum);
GST_DEBUG_OBJECT (jitterbuffer, "Pushing event %" GST_PTR_FORMAT
", seqnum %d", outevent, seqnum);
if (do_push)
gst_pad_push_event (priv->srcpad, outevent);
......@@ -3196,12 +3197,18 @@ gst_rtp_jitter_buffer_sink_query (GstPad * pad, GstObject * parent,
RTPJitterBufferItem *item;
JBUF_LOCK_CHECK (priv, out_flushing);
GST_DEBUG_OBJECT (jitterbuffer, "adding serialized query");
item = alloc_item (query, ITEM_TYPE_QUERY, -1, -1, -1, 0, -1);
rtp_jitter_buffer_insert (priv->jbuf, item, NULL, NULL);
JBUF_SIGNAL_EVENT (priv);
JBUF_WAIT_QUERY (priv, out_flushing);
res = priv->last_query;
if (rtp_jitter_buffer_get_mode (priv->jbuf) !=
RTP_JITTER_BUFFER_MODE_BUFFER) {
GST_DEBUG_OBJECT (jitterbuffer, "adding serialized query");
item = alloc_item (query, ITEM_TYPE_QUERY, -1, -1, -1, 0, -1);
rtp_jitter_buffer_insert (priv->jbuf, item, NULL, NULL);
JBUF_SIGNAL_EVENT (priv);
JBUF_WAIT_QUERY (priv, out_flushing);
res = priv->last_query;
} else {
GST_DEBUG_OBJECT (jitterbuffer, "refusing query, we are buffering");
res = FALSE;
}
JBUF_UNLOCK (priv);
} else {
res = gst_pad_query_default (pad, parent, query);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment