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

Git pushed a commit to branch master
in repository ffmpeg.

commit b938b5c8e4927dcca733e2f33d1b857fe640f831
Author:     James Almer <[email protected]>
AuthorDate: Mon Oct 19 19:05:29 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Fri Oct 23 11:22:12 2026 -0300

    avformat/mov: simplify setting Exif side data
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/mov.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0a878d8b53..e2f33643f7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -11114,28 +11114,22 @@ static int set_exif_from_item(AVFormatContext *s,
                                                     AV_PKT_DATA_EXIF);
     const AVExifMetadata *ifd = &item->ifd;
     AVBufferRef *buf = NULL;
-    int64_t offset;
     int err;
 
     if (sd)
         return 0;
 
-    err = av_exif_write(s, ifd, &buf, AV_EXIF_T_OFF);
+    err = av_exif_write(s, ifd, &buf, AV_EXIF_TIFF_HEADER);
     if (err < 0)
         return err;
 
-    offset = AV_RB32(buf->data) + 4;
-    if (offset >= buf->size) {
-        av_buffer_unref(&buf);
-        return AVERROR_INVALIDDATA;
-    }
     sd = av_packet_side_data_new(coded_side_data, nb_coded_side_data,
-                                 AV_PKT_DATA_EXIF, buf->size - offset, 0);
+                                 AV_PKT_DATA_EXIF, buf->size, 0);
     if (!sd) {
         av_buffer_unref(&buf);
         return AVERROR(ENOMEM);
     }
-    memcpy(sd->data, buf->data + offset, buf->size - offset);
+    memcpy(sd->data, buf->data, buf->size);
 
     av_buffer_unref(&buf);
 

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