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

Git pushed a commit to branch master
in repository ffmpeg.

commit 8af2bc850042a71788df1c53ede029a13c172242
Author:     Baptiste Coudurier <[email protected]>
AuthorDate: Fri Nov 13 16:23:07 2026 -0800
Commit:     Baptiste Coudurier <[email protected]>
CommitDate: Mon Nov 23 06:01:27 2026 +0000

    avformat/mxfenc: include the KLV key and length in the element delta
    
    Element deltas were missing the 20 byte key and length of the
    preceding elements, accumulate the real element strides.
    
    Signed-off-by: Baptiste Coudurier <[email protected]>
---
 libavformat/mxfenc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 887d5bd825..6945980ec0 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2081,7 +2081,7 @@ static int mxf_write_index_table_segment(AVFormatContext 
*s)
     int i, j, temporal_reordering = 0;
     int key_index = mxf->last_key_index;
     int prev_non_b_picture = 0;
-    int audio_frame_size = 0;
+    unsigned element_delta = 0;
     int64_t pos;
     int err;
 
@@ -2156,12 +2156,11 @@ static int 
mxf_write_index_table_segment(AVFormatContext *s)
             // system item size including klv fill, no system item in OPAtom
             avio_wb32(pb, IS_OPATOM(s) ? 0 : KAG_SIZE);
         } else { // audio or data track
-            if (!audio_frame_size) {
-                audio_frame_size = sc->frame_size;
-                audio_frame_size += klv_fill_size(audio_frame_size);
-            }
             avio_w8(pb, 1);
-            avio_wb32(pb, (i-1)*audio_frame_size); // element delta
+            avio_wb32(pb, element_delta);
+            // each element is KAG aligned and starts with its 16 byte key and 
4 byte length
+            element_delta += 16 + 4 + sc->frame_size;
+            element_delta += klv_fill_size(element_delta);
         }
     }
 

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