summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r--gst/rtpmanager/async_jitter_queue.c3
-rw-r--r--gst/rtpmanager/gstrtpjitterbuffer.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/gst/rtpmanager/async_jitter_queue.c b/gst/rtpmanager/async_jitter_queue.c
index 77980c98..73597b28 100644
--- a/gst/rtpmanager/async_jitter_queue.c
+++ b/gst/rtpmanager/async_jitter_queue.c
@@ -396,9 +396,10 @@ gboolean
async_jitter_queue_push_sorted (AsyncJitterQueue * queue,
gpointer data, GCompareDataFunc func, gpointer user_data)
{
- g_return_val_if_fail (queue != NULL, FALSE);
gboolean ret;
+ g_return_val_if_fail (queue != NULL, FALSE);
+
g_mutex_lock (queue->mutex);
ret = async_jitter_queue_push_sorted_unlocked (queue, data, func, user_data);
g_mutex_unlock (queue->mutex);
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c
index 33f78741..d33d17ae 100644
--- a/gst/rtpmanager/gstrtpjitterbuffer.c
+++ b/gst/rtpmanager/gstrtpjitterbuffer.c
@@ -819,9 +819,10 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstBuffer * buffer)
if (priv->drop_on_latency) {
if (async_jitter_queue_length_ts_units_unlocked (priv->queue) >=
priv->latency_ms * priv->clock_rate / 1000) {
+ GstBuffer *old_buf;
+
GST_DEBUG_OBJECT (jitterbuffer, "Queue full, dropping old packet #%d",
seqnum);
- GstBuffer *old_buf;
old_buf = async_jitter_queue_pop_unlocked (priv->queue);
gst_buffer_unref (old_buf);