The branch, master has been updated
via 5169b0c3dca3a142a84ed157c964cb650ff5a25e (commit)
from 93ccca22bb8b22b0eadc7346a61e395b21dd42b8 (commit)
- Log -----------------------------------------------------------------
commit 5169b0c3dca3a142a84ed157c964cb650ff5a25e
Author: Frank Plowman <[email protected]>
AuthorDate: Sun Oct 19 12:28:00 2025 +0100
Commit: James Almer <[email protected]>
CommitDate: Thu Nov 27 14:51:52 2025 +0000
lavc/vvc: Ensure seq_decode is always updated with SPS
seq_decode is used to ensure that a picture and all of its reference
pictures use the same SPS. Any time the SPS changes, seq_decode should
be incremented. Prior to this patch, seq_decode was incremented in
frame_context_setup, which is called after the SPS is potentially
changed in decode_sps. Should the decoder encounter an error between
changing the SPS and incrementing seq_decode, the SPS could be modified
while seq_decode was not incremented, which could lead to invalid
reference pictures and various downstream issues. By instead updating
seq_decode within the picture set manager, we ensure seq_decode and the
SPS are always updated in tandem.
diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c
index bfe330e028..028f34b491 100644
--- a/libavcodec/vvc/dec.c
+++ b/libavcodec/vvc/dec.c
@@ -726,7 +726,6 @@ static int frame_context_setup(VVCFrameContext *fc,
VVCContext *s)
}
if (IS_IDR(s)) {
- s->seq_decode = (s->seq_decode + 1) & 0xff;
ff_vvc_clear_refs(fc);
}
diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c
index 8faee1d826..a591851238 100644
--- a/libavcodec/vvc/ps.c
+++ b/libavcodec/vvc/ps.c
@@ -279,12 +279,14 @@ fail:
static int decode_sps(VVCParamSets *ps, AVCodecContext *c, const H266RawSPS
*rsps, int is_clvss)
{
+ VVCContext *s = c->priv_data;
const int sps_id = rsps->sps_seq_parameter_set_id;
const VVCSPS *old_sps = ps->sps_list[sps_id];
const VVCSPS *sps;
if (is_clvss) {
ps->sps_id_used = 0;
+ s->seq_decode = (s->seq_decode + 1) & 0xff;
}
if (old_sps) {
-----------------------------------------------------------------------
Summary of changes:
libavcodec/vvc/dec.c | 1 -
libavcodec/vvc/ps.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]