From 550cf229a06519e4a63d6a25ca821ea743a8fb85 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Tue, 13 Feb 2024 14:30:21 +0900 Subject: [PATCH] decoder/h264: reset last_field when needed When we encounter an IDR frame, both the DPB and last_field need to be cleared. --- src/decoder/stateless/h264.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/decoder/stateless/h264.rs b/src/decoder/stateless/h264.rs index df7b37a7..513736e2 100644 --- a/src/decoder/stateless/h264.rs +++ b/src/decoder/stateless/h264.rs @@ -1177,6 +1177,7 @@ where // emptied without output of the pictures they contain, and DPB // fullness is set to 0. self.codec.dpb.clear(); + self.codec.last_field = None; } }