Skip to content

Commit

Permalink
Don't try to rewrite TL0PICIDX on VP8 packets that don't have one.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Feb 22, 2024
1 parent f8f2f81 commit e83fce4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions jvb/src/main/kotlin/org/jitsi/videobridge/SsrcCache.kt
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,12 @@ private class Av1DDCodecDeltas(val frameNumDelta: Int, val templateIdDelta: Int)
}

private fun RtpPacket.getCodecState(): CodecState? {
return when (this) {
is Vp8Packet -> Vp8CodecState(this)
is Vp9Packet -> Vp9CodecState(this)
is Av1DDPacket -> Av1DDCodecState(this)
return when {
this is Vp8Packet && isRewritable() -> Vp8CodecState(this)
this is Vp9Packet -> Vp9CodecState(this)
this is Av1DDPacket -> Av1DDCodecState(this)
else -> null
}
}

private fun Vp8Packet.isRewritable(): Boolean = hasTL0PICIDX

0 comments on commit e83fce4

Please sign in to comment.