Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not prevent keyframe detection when throttling PLIs sent (#408) #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/org/jitsi/impl/neomedia/rtp/MediaStreamTrackDesc.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,21 @@ void update(
return;
}

if (nowMs - statistics.lastKeyframeMs < MIN_KEY_FRAME_WAIT_MS)
{
// The webrtc engine is sending keyframes from high to low and less
// often than 300 millis. The first fresh keyframe that we observe
// after we've waited for that long determines the streams that are
// streaming (not suspended).
//
// On the other hand, if this packet is not a keyframe, the only
// other action we can do is send an FIR and it's pointless to spam
// the engine.
return;
}

if (!frameDesc.isIndependent())
{
if (nowMs - statistics.lastKeyframeMs < MIN_KEY_FRAME_WAIT_MS)
{
// The webrtc engine is sending keyframes from high to low and less
// often than 300 millis. The first fresh keyframe that we observe
// after we've waited for that long determines the streams that are
// streaming (not suspended).
//
// On the other hand, if this packet is not a keyframe, the only
// other action we can do is send an FIR and it's pointless to spam
// the engine.
return;
}

if (!isPacketOfNewFrame)
{
// We only check for stream suspension if this is the first
Expand Down Expand Up @@ -308,7 +308,7 @@ void update(
{
// This is a late key frame header packet that we've missed.

if (!encoding.isActive())
if (!encoding.isActive() && !(nowMs - statistics.lastKeyframeMs < MIN_KEY_FRAME_WAIT_MS))
{
if (logger.isTraceEnabled())
{
Expand Down