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

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

commit 2788833ec9a9537f6b8ac34c2cba215ea6973562
Author:     James Almer <[email protected]>
AuthorDate: Thu Oct 29 12:46:31 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Sat Oct 31 20:47:33 2026 -0300

    avcodec/cbs_lcevc: fix setting offsets for Encoded Data block payloads
    
    It was including almost every byte from the entire NAL rather than the
    Encoded Data block.
    
    Signed-off-by: James Almer <[email protected]>
    (cherry picked from commit f806a79b7282b9a4ecf42bdb3959c78ff8234298)
---
 libavcodec/cbs_lcevc.c                 | 2 +-
 libavcodec/cbs_lcevc.h                 | 2 +-
 libavcodec/cbs_lcevc_syntax_template.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/cbs_lcevc.c b/libavcodec/cbs_lcevc.c
index f13e717aa3..52337cad25 100644
--- a/libavcodec/cbs_lcevc.c
+++ b/libavcodec/cbs_lcevc.c
@@ -453,7 +453,7 @@ static int cbs_lcevc_read_nal_unit(CodedBitstreamContext 
*ctx,
                 slice->data_ref = av_buffer_ref(unit->data_ref);
                 if (!slice->data_ref)
                      return AVERROR(ENOMEM);
-                slice->data = unit->data + slice->header_size;
+                slice->data = unit->data + slice->data_offset;
             }
         }
         break;
diff --git a/libavcodec/cbs_lcevc.h b/libavcodec/cbs_lcevc.h
index 371c7912e0..0dde83a299 100644
--- a/libavcodec/cbs_lcevc.h
+++ b/libavcodec/cbs_lcevc.h
@@ -121,7 +121,7 @@ typedef struct LCEVCRawEncodedData {
 
     uint8_t     *data;
     AVBufferRef *data_ref;
-    size_t       header_size;
+    ptrdiff_t    data_offset;
     size_t       data_size;
 
     LCEVCRawSequenceConfig *sc; ///< RefStruct references
diff --git a/libavcodec/cbs_lcevc_syntax_template.c 
b/libavcodec/cbs_lcevc_syntax_template.c
index c497c5c2fb..cfc7a5c0da 100644
--- a/libavcodec/cbs_lcevc_syntax_template.c
+++ b/libavcodec/cbs_lcevc_syntax_template.c
@@ -294,7 +294,7 @@ LCEVC_BLOCK_FUNC(encoded_data, (CodedBitstreamContext *ctx, 
RWContext *rw,
     int pos = get_bits_count(rw) - start;
     int len = state->payload_size;
 
-    current->header_size = pos / 8;
+    current->data_offset = get_bits_count(rw) / 8;
     current->data_size = len - pos / 8;
     skip_bits_long(rw, current->data_size * 8);
 #else

-- 
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