From 0b4a44d19c9e97480b069db91cb7abd168af2097 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 12 Nov 2026 21:31:27 -0600 Subject: [PATCH] Fix missing global reinitialization when starting a new stream --- src/RtspConnection.c | 1 + src/VideoDepacketizer.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/RtspConnection.c b/src/RtspConnection.c index a754843..33b1d43 100644 --- a/src/RtspConnection.c +++ b/src/RtspConnection.c @@ -953,6 +953,7 @@ int performRtspHandshake(PSERVER_INFORMATION serverInfo) { controlStreamId = APP_VERSION_AT_LEAST(7, 1, 431) ? "streamid=control/13/0" : "streamid=control/1/0"; AudioEncryptionEnabled = false; encryptedRtspEnabled = serverInfo->rtspSessionUrl && strstr(serverInfo->rtspSessionUrl, "rtspenc://"); + encryptionSequenceNumber = 0; encryptionCtx = PltCreateCryptoContext(0); decryptionCtx = PltCreateCryptoContext(1); diff --git a/src/VideoDepacketizer.c b/src/VideoDepacketizer.c index 2196428..69ec1db 100644 --- a/src/VideoDepacketizer.c +++ b/src/VideoDepacketizer.c @@ -103,6 +103,7 @@ void initializeVideoDepacketizer(int pktSize) { firstPacketRtpTimestamp = 0; lastPacketPayloadLength = 0; dropStatePending = false; + consecutiveFrameDrops = 0; atomic_store_explicit(&idrFrameProcessed, false, memory_order_relaxed); strictIdrFrameWait = !isReferenceFrameInvalidationEnabled(); }