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

Git pushed a commit to branch master
in repository ffmpeg.

commit 447a07fc12b5f3c6cc9fba4c0ffd438e5915c8d9
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Jun 4 18:14:20 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Fri Jun 5 03:02:04 2026 +0000

    avcodec/decode: Move exif declarations to exif_internal.h
    
    It is (arguably) a slightly better place for them and avoids
    a forward declaration of enum AVExifHeaderMode which is not possible
    in ISO C before C23 (and requires specifying the underlying type
    with C23).
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/decode.c        |  1 +
 libavcodec/decode.h        | 29 -----------------------------
 libavcodec/exif_internal.h | 26 ++++++++++++++++++++++++++
 libavcodec/mjpegdec.c      |  1 +
 4 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index c82e357845..81659435a0 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -49,6 +49,7 @@
 #include "codec_internal.h"
 #include "decode.h"
 #include "exif.h"
+#include "exif_internal.h"
 #include "hwaccel_internal.h"
 #include "hwconfig.h"
 #include "internal.h"
diff --git a/libavcodec/decode.h b/libavcodec/decode.h
index 536c71f3e4..215b862020 100644
--- a/libavcodec/decode.h
+++ b/libavcodec/decode.h
@@ -230,33 +230,4 @@ int ff_decode_content_light_new_ext(const AVCodecContext 
*avctx,
                                     AVFrameSideData ***sd, int *nb_sd,
                                     struct AVContentLightMetadata **clm);
 
-enum AVExifHeaderMode;
-
-/**
- * Attach the data buffer to the frame. This is mostly a wrapper for
- * av_side_data_new_from_buffer, but it checks if the orientation tag is
- * present in the provided EXIF buffer. If it is, it zeroes it out and
- * attaches that information as an AV_FRAME_DATA_DISPLAYMATRIX instead
- * of including it in the AV_FRAME_DATA_EXIF side data buffer.
- *
- * *buf is ALWAYS consumed by this function and NULL written in its place, even
- * on failure.
- */
-int ff_decode_exif_attach_buffer(AVCodecContext *avctx, AVFrame *frame, 
AVBufferRef **buf,
-                                 enum AVExifHeaderMode header_mode);
-
-struct AVExifMetadata;
-
-/**
- * Attach an already-parsed EXIF metadata struct to the frame as a side data
- * buffer. It writes the EXIF IFD into the buffer and attaches the buffer to
- * the frame.
- *
- * If the metadata struct contains an orientation tag, it will be zeroed before
- * writing, and instead, an AV_FRAME_DATA_DISPLAYMATRIX will be attached in
- * addition to the AV_FRAME_DATA_EXIF side data.
- */
-int ff_decode_exif_attach_ifd(AVCodecContext *avctx, AVFrame *frame,
-                              const struct AVExifMetadata *ifd);
-
 #endif /* AVCODEC_DECODE_H */
diff --git a/libavcodec/exif_internal.h b/libavcodec/exif_internal.h
index 713b84ef62..7fd593ce81 100644
--- a/libavcodec/exif_internal.h
+++ b/libavcodec/exif_internal.h
@@ -65,4 +65,30 @@ int ff_exif_sanitize_ifd(void *logctx, const AVFrame *frame, 
AVExifMetadata *ifd
  */
 int ff_exif_get_buffer(void *logctx, const AVFrame *frame, AVBufferRef 
**buffer, enum AVExifHeaderMode header_mode);
 
+struct AVCodecContext;
+/**
+ * Attach the data buffer to the frame. This is mostly a wrapper for
+ * av_side_data_new_from_buffer, but it checks if the orientation tag is
+ * present in the provided EXIF buffer. If it is, it zeroes it out and
+ * attaches that information as an AV_FRAME_DATA_DISPLAYMATRIX instead
+ * of including it in the AV_FRAME_DATA_EXIF side data buffer.
+ *
+ * *buf is ALWAYS consumed by this function and NULL written in its place, even
+ * on failure.
+ */
+int ff_decode_exif_attach_buffer(struct AVCodecContext *avctx, AVFrame *frame, 
AVBufferRef **buf,
+                                 enum AVExifHeaderMode header_mode);
+
+/**
+ * Attach an already-parsed EXIF metadata struct to the frame as a side data
+ * buffer. It writes the EXIF IFD into the buffer and attaches the buffer to
+ * the frame.
+ *
+ * If the metadata struct contains an orientation tag, it will be zeroed before
+ * writing, and instead, an AV_FRAME_DATA_DISPLAYMATRIX will be attached in
+ * addition to the AV_FRAME_DATA_EXIF side data.
+ */
+int ff_decode_exif_attach_ifd(struct AVCodecContext *avctx, AVFrame *frame,
+                              const struct AVExifMetadata *ifd);
+
 #endif /* AVCODEC_EXIF_INTERNAL_H */
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index e6c4f4acfc..d72646206b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -43,6 +43,7 @@
 #include "copy_block.h"
 #include "decode.h"
 #include "exif.h"
+#include "exif_internal.h"
 #include "hwaccel_internal.h"
 #include "hwconfig.h"
 #include "idctdsp.h"

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

Reply via email to