mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 13:50:50 +08:00
Fix #21260 The early code didn't reset the JxlDecoder. If the caller re-send the same packet to JxlDecoder after avcodec_flush_buffers() (free ctx->frame). It will directly hit SUCCESS event (skip all EVENTs). In this case, the ctx->frame already flushed by avcodec_flush_buffers, so the received frame will be invalid (has no private_ref) that causes assertion in decode_receive_frame_internal(). MPV meet this issue because it seek the jxl image (second read the same pkt) when it does crop through config `C vf toggle crop=in_w:in_w/2.4`. This patch make sure hit the entire SUCCESS event (contains reset the JxlDecoder) when frame_complete is true. Signed-off-by: Jack Lau <jacklau1222gm@gmail.com>
28 KiB
28 KiB