This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 9c14527f1a862c3f627cc999689ed84c3569f2a9
Author:     James Almer <[email protected]>
AuthorDate: Tue Dec 9 14:36:22 2025 -0300
Commit:     James Almer <[email protected]>
CommitDate: Fri Dec 12 15:21:49 2025 -0300

    avcodec/vvc/refs: export in-band LCEVC side data in frames
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/vvc/dec.c  | 5 +++--
 libavcodec/vvc/refs.c | 9 +++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c
index 028f34b491..194e2fc7ef 100644
--- a/libavcodec/vvc/dec.c
+++ b/libavcodec/vvc/dec.c
@@ -807,11 +807,11 @@ static int frame_start(VVCContext *s, VVCFrameContext 
*fc, SliceContext *sc)
     if (!s->temporal_id && !ph->r->ph_non_ref_pic_flag && !(IS_RASL(s) || 
IS_RADL(s)))
         s->poc_tid0 = ph->poc;
 
+    decode_prefix_sei(fc, s);
+
     if ((ret = ff_vvc_set_new_ref(s, fc, &fc->frame)) < 0)
         goto fail;
 
-    decode_prefix_sei(fc, s);
-
     ret = set_side_data(s, fc);
     if (ret < 0)
         goto fail;
@@ -1225,6 +1225,7 @@ static av_cold void vvc_decode_flush(AVCodecContext 
*avctx)
 
     if (s->fcs) {
         VVCFrameContext *last = get_frame_context(s, s->fcs, s->nb_frames - 1);
+        ff_vvc_sei_reset(&last->sei);
         ff_vvc_flush_dpb(last);
     }
 
diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc/refs.c
index f134a100b4..c1f027aed5 100644
--- a/libavcodec/vvc/refs.c
+++ b/libavcodec/vvc/refs.c
@@ -133,6 +133,15 @@ static VVCFrame *alloc_frame(VVCContext *s, 
VVCFrameContext *fc)
         frame->sps = av_refstruct_ref_c(fc->ps.sps);
         frame->pps = av_refstruct_ref_c(fc->ps.pps);
 
+        // Add LCEVC SEI metadata here, as it's needed in get_buffer()
+        if (fc->sei.common.lcevc.info) {
+            HEVCSEILCEVC *lcevc = &fc->sei.common.lcevc;
+            ret = ff_frame_new_side_data_from_buf(s->avctx, frame->frame,
+                                                  AV_FRAME_DATA_LCEVC, 
&lcevc->info);
+            if (ret < 0)
+                goto fail;
+        }
+
         ret = ff_thread_get_buffer(s->avctx, frame->frame, 
AV_GET_BUFFER_FLAG_REF);
         if (ret < 0)
             return NULL;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to