From b3b1be0b1f8b662f79ffad24bd4c4b239de56be6 Mon Sep 17 00:00:00 2001 From: Heikki Tampio Date: Wed, 27 Mar 2024 13:43:14 +0200 Subject: [PATCH] h26x: Fix bug when start fragment was not received, but subsequent ones were. --- src/formats/h26x.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/formats/h26x.cc b/src/formats/h26x.cc index 16228262..be738a31 100644 --- a/src/formats/h26x.cc +++ b/src/formats/h26x.cc @@ -810,8 +810,10 @@ rtp_error_t uvgrtp::formats::h26x::packet_handler(void* args, int rce_flags, uin } if (next == c || s) { - continuous = true; - reconstructed_fragments.at(start).seqs.insert(c); + if (reconstructed_fragments.find(start) != reconstructed_fragments.end() ) { + continuous = true; + reconstructed_fragments.at(start).seqs.insert(c); + } } next = next_seq_num(c); //UVG_LOG_DEBUG("Current fragment %u, next %u, start %d, end %d, continuous %d", c, next, s, e, continuous);