Skip to content

Commit

Permalink
Merge pull request #221 from Banner2404/h26x-reconstruction-fix
Browse files Browse the repository at this point in the history
Fixed the issue when reconstructing h264 frames that are not continuous
  • Loading branch information
jrsnen authored Jun 17, 2024
2 parents f75942b + 966dc9d commit 4ac1cb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/formats/h26x.cc
Original file line number Diff line number Diff line change
Expand Up @@ -806,14 +806,17 @@ rtp_error_t uvgrtp::formats::h26x::packet_handler(void* args, int rce_flags, uin

if (s) {
start = c;
continuous = true;
reconstructed_fragments[c] = {}; // If this is start FU, initialize a new map for it
}

if (next == c || s) {
if (continuous && (next == c || s)) {
if (reconstructed_fragments.find(start) != reconstructed_fragments.end() ) {
continuous = true;
reconstructed_fragments.at(start).seqs.insert(c);
}
} else {
continuous = false;
}
next = next_seq_num(c);
//UVG_LOG_DEBUG("Current fragment %u, next %u, start %d, end %d, continuous %d", c, next, s, e, continuous);
Expand Down

0 comments on commit 4ac1cb6

Please sign in to comment.