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

Git pushed a commit to branch release/9.1
in repository ffmpeg.

The following commit(s) were added to refs/heads/release/9.1 by this push:
     new c74d46f683 avcodec/cbs_lcevc: fix parsing encoded data blocks with no 
residuals
c74d46f683 is described below

commit c74d46f683b9b11a4c968bf51ef6db306c7d9eee
Author:     James Almer <[email protected]>
AuthorDate: Mon Nov 23 12:50:26 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Mon Nov 23 19:24:38 2026 -0300

    avcodec/cbs_lcevc: fix parsing encoded data blocks with no residuals
    
    Assisted by codex-sol-6.1
    
    Signed-off-by: James Almer <[email protected]>
    (cherry picked from commit 4155ce3d4a18cfa01112db57bcfcac6e1db8de30)
---
 libavcodec/cbs_lcevc_syntax_template.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/libavcodec/cbs_lcevc_syntax_template.c 
b/libavcodec/cbs_lcevc_syntax_template.c
index cfc7a5c0da..1c7aeb63dd 100644
--- a/libavcodec/cbs_lcevc_syntax_template.c
+++ b/libavcodec/cbs_lcevc_syntax_template.c
@@ -288,20 +288,21 @@ LCEVC_BLOCK_FUNC(encoded_data, (CodedBitstreamContext 
*ctx, RWContext *rw,
     CHECK(FUNC(byte_alignment)(ctx, rw));
 
 #ifdef READ
-    if (!ff_cbs_h2645_read_more_rbsp_data(rw))
-        return AVERROR_INVALIDDATA;
-
     int pos = get_bits_count(rw) - start;
     int len = state->payload_size;
 
+    // The process block is size-delimited and may contain only chunk flags,
+    // with no residual data when all chunks are empty.
     current->data_offset = get_bits_count(rw) / 8;
     current->data_size = len - pos / 8;
     skip_bits_long(rw, current->data_size * 8);
 #else
-    err = ff_cbs_h2645_write_slice_data(ctx, rw, current->data,
-                                     current->data_size, 0);
-    if (err < 0)
-        return err;
+    if (current->data_size) {
+        err = ff_cbs_h2645_write_slice_data(ctx, rw, current->data,
+                                            current->data_size, 0);
+        if (err < 0)
+            return err;
+    }
 #endif
 
     av_refstruct_replace(&current->sc, priv->sc);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to