mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
Unlock the jitterbuffer before pushing out the packet-lost events.
Move some code before we do the unlock to make the jitterbuffer state consistent while we are unlocked.
This commit is contained in:
parent
dfdc9b6662
commit
7f0b100db5
1 changed files with 9 additions and 6 deletions
|
@ -1442,6 +1442,11 @@ again:
|
||||||
priv->num_late++;
|
priv->num_late++;
|
||||||
discont = TRUE;
|
discont = TRUE;
|
||||||
|
|
||||||
|
/* update our expected next packet */
|
||||||
|
priv->last_popped_seqnum = next_seqnum;
|
||||||
|
priv->last_out_time = out_time;
|
||||||
|
priv->next_seqnum = (next_seqnum + 1) & 0xffff;
|
||||||
|
|
||||||
if (priv->do_lost) {
|
if (priv->do_lost) {
|
||||||
/* create paket lost event */
|
/* create paket lost event */
|
||||||
event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
|
event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
|
||||||
|
@ -1449,13 +1454,11 @@ again:
|
||||||
"seqnum", G_TYPE_UINT, (guint) next_seqnum,
|
"seqnum", G_TYPE_UINT, (guint) next_seqnum,
|
||||||
"timestamp", G_TYPE_UINT64, out_time,
|
"timestamp", G_TYPE_UINT64, out_time,
|
||||||
"duration", G_TYPE_UINT64, duration, NULL));
|
"duration", G_TYPE_UINT64, duration, NULL));
|
||||||
gst_pad_push_event (priv->srcpad, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* update our expected next packet */
|
JBUF_UNLOCK (priv);
|
||||||
priv->last_popped_seqnum = next_seqnum;
|
gst_pad_push_event (priv->srcpad, event);
|
||||||
priv->last_out_time = out_time;
|
JBUF_LOCK_CHECK (priv, flushing);
|
||||||
priv->next_seqnum = (next_seqnum + 1) & 0xffff;
|
}
|
||||||
/* look for next packet */
|
/* look for next packet */
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue