mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
rtpjitterbuffer: Change RTX timer availability checks to assertions
It's impossible to end up in the corresponding code without a timer for RTX packets because otherwise it would be an unsolicited RTX packet and we would've already returned early. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2996>
This commit is contained in:
parent
dc408d56c5
commit
94122ba11b
1 changed files with 15 additions and 3 deletions
|
@ -3182,8 +3182,12 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
|
|||
priv->next_in_seqnum = (seqnum + 1) & 0xffff;
|
||||
}
|
||||
|
||||
if (is_rtx)
|
||||
if (is_rtx) {
|
||||
/* For RTX there must be a corresponding timer or it would be an
|
||||
* unsolicited RTX packet that would be dropped */
|
||||
g_assert (timer != NULL);
|
||||
timer->num_rtx_received++;
|
||||
}
|
||||
|
||||
/* At 2^15, we would detect a seqnum rollover too early, therefore
|
||||
* limit the queue size. But let's not limit it to a number that is
|
||||
|
@ -3215,7 +3219,11 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
|
|||
/* priv->last_popped_seqnum >= seqnum, we're too late. */
|
||||
if (G_UNLIKELY (gap <= 0)) {
|
||||
if (priv->do_retransmission) {
|
||||
if (is_rtx && timer) {
|
||||
if (is_rtx) {
|
||||
/* For RTX there must be a corresponding timer or it would be an
|
||||
* unsolicited RTX packet that would be dropped */
|
||||
g_assert (timer != NULL);
|
||||
|
||||
update_rtx_stats (jitterbuffer, timer, dts, FALSE);
|
||||
/* Only count the retranmitted packet too late if it has been
|
||||
* considered lost. If the original packet arrived before the
|
||||
|
@ -3271,8 +3279,12 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
|
|||
* FALSE if a packet with the same seqnum was already in the queue, meaning we
|
||||
* have a duplicate. */
|
||||
if (G_UNLIKELY (duplicate)) {
|
||||
if (is_rtx && timer)
|
||||
if (is_rtx) {
|
||||
/* For RTX there must be a corresponding timer or it would be an
|
||||
* unsolicited RTX packet that would be dropped */
|
||||
g_assert (timer != NULL);
|
||||
update_rtx_stats (jitterbuffer, timer, dts, FALSE);
|
||||
}
|
||||
goto duplicate;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue