PR #26351 opened by fran6co URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26351 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26351.patch
# Summary of changes The picture structure of a picture timing SEI was kept until the next such SEI, in the decoder and in the parser. The pictures of an access unit without picture timing SEI, e.g. of a progressive sequence after a field sequence, were therefore flagged interlaced. Found in https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22987 >From bcd9bc8e4b7e0fef62ea38ab9ec0f71b432b4853 Mon Sep 17 00:00:00 2001 From: Francisco Facioni <[email protected]> Date: Wed, 25 Nov 2026 08:26:32 +0100 Subject: [PATCH] avcodec/hevc: reset the picture timing SEI state for every access unit The picture structure of a picture timing SEI was kept until the next such SEI, in the decoder and in the parser. The pictures of an access unit without picture timing SEI, e.g. of a progressive sequence after a field sequence, were therefore flagged interlaced. --- libavcodec/hevc/hevcdec.c | 1 + libavcodec/hevc/sei.h | 1 + 2 files changed, 2 insertions(+) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 3bee36ef2fb..0e2e45fc55b 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -4637,6 +4637,7 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) int flags = (H2645_FLAG_IS_NALFF * !!s->is_nalff) | H2645_FLAG_SMALL_PADDING; s->cur_frame = s->collocated_ref = NULL; + s->sei.picture_timing.picture_struct = AV_PICTURE_STRUCTURE_UNKNOWN; s->last_eos = s->eos; s->eos = 0; s->slice_initialized = 0; diff --git a/libavcodec/hevc/sei.h b/libavcodec/hevc/sei.h index 59bd2b45f87..7e3092f073a 100644 --- a/libavcodec/hevc/sei.h +++ b/libavcodec/hevc/sei.h @@ -127,6 +127,7 @@ int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, */ static inline void ff_hevc_reset_sei(HEVCSEI *sei) { + sei->picture_timing.picture_struct = AV_PICTURE_STRUCTURE_UNKNOWN; sei->timecode.present = 0; sei->tdrdi.present = 0; ff_h2645_sei_reset(&sei->common); -- 2.54.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
