Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 53466e2

Browse files
author
Alessandro Toppi
committed
Reset NACK queue only when receiving a KeyFrame with a highest sequence number.
1 parent 47c8ba7 commit 53466e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎ice.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,15 +2409,16 @@ static void janus_ice_cb_nice_recv(NiceAgent *agent, guint stream_id, guint comp
24092409
/* ... unless NACKs are disabled for this medium */
24102410
return;
24112411
}
2412+
guint16 new_seqn = ntohs(header->seq_number);
24122413
/* If this is video, check if this is a keyframe: if so, we empty our NACK queue */
24132414
if(video && stream->video_is_keyframe) {
24142415
if(stream->video_is_keyframe(payload, plen)) {
2415-
JANUS_LOG(LOG_HUGE, "[%"SCNu64"] Keyframe received, resetting NACK queue\n", handle->handle_id);
2416-
if(component->last_seqs_video[vindex])
2416+
if(component->last_seqs_video[vindex] && (int16_t)(new_seqn-rtcp_ctx->max_seq_nr) >0) {
2417+
JANUS_LOG(LOG_HUGE, "[%"SCNu64"] Keyframe received with a highest sequence number, resetting NACK queue\n", handle->handle_id);
24172418
janus_seq_list_free(&component->last_seqs_video[vindex]);
2419+
}
24182420
}
24192421
}
2420-
guint16 new_seqn = ntohs(header->seq_number);
24212422
guint16 cur_seqn;
24222423
int last_seqs_len = 0;
24232424
janus_mutex_lock(&component->mutex);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /