mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
rtpjitterbuffer: fix locking
Take the lock earlier so that we do things that follow with the right locking.
This commit is contained in:
parent
dece8413ef
commit
f87875e35b
1 changed files with 5 additions and 5 deletions
|
@ -1788,6 +1788,11 @@ again:
|
|||
|
||||
ret = gst_clock_id_wait (id, &clock_jitter);
|
||||
|
||||
JBUF_LOCK (priv);
|
||||
/* and free the entry */
|
||||
gst_clock_id_unref (id);
|
||||
priv->clock_id = NULL;
|
||||
|
||||
if (ret == GST_CLOCK_EARLY && gap > 0
|
||||
&& clock_jitter > (priv->latency_ns + priv->peer_latency)) {
|
||||
GstClockTimeDiff total_duration;
|
||||
|
@ -1812,11 +1817,6 @@ again:
|
|||
lost_packets_late = TRUE;
|
||||
}
|
||||
|
||||
JBUF_LOCK (priv);
|
||||
/* and free the entry */
|
||||
gst_clock_id_unref (id);
|
||||
priv->clock_id = NULL;
|
||||
|
||||
/* at this point, the clock could have been unlocked by a timeout, a new
|
||||
* tail element was added to the queue or because we are shutting down. Check
|
||||
* for shutdown first. */
|
||||
|
|
Loading…
Reference in a new issue