This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 0c39b1bccd1298df0f8ff87e2017af7d206dbecd Author: Leo Izen <[email protected]> AuthorDate: Sat Apr 4 11:22:28 2026 -0400 Commit: Leo Izen <[email protected]> CommitDate: Fri May 1 07:40:24 2026 -0400 avcodec/exif.h: fix documentation on av_exif_get_entry and similar Add additional documentation to av_exif_get_entry and also to av_exif_set_entry that was already part of the existing ABI but was insufficiently documented before this commit. Also clarifies that av_fast_realloc is used, instead of av_realloc on av_exif_set_entry. Signed-off-by: Leo Izen <[email protected]> --- libavcodec/exif.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/libavcodec/exif.h b/libavcodec/exif.h index 1824a38d1c..a19ba6925d 100644 --- a/libavcodec/exif.h +++ b/libavcodec/exif.h @@ -138,7 +138,7 @@ int32_t av_exif_get_tag_id(const char *name); * ID, it will set the existing one to have the other information provided. Otherwise, it * will allocate a new entry. * - * This function reallocates ifd->entries using av_realloc and allocates (using av_malloc) + * This function reallocates ifd->entries using av_fast_realloc and allocates (using av_malloc) * a new value member of the entry, then copies the contents of value into that buffer. */ int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTiffDataType type, @@ -154,8 +154,14 @@ int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTif * will be written into *value. * * If the entry was present and returned successfully, a positive number is returned. + * + * The positive number is equal to 1 plus the offset at which the entry was found. If the + * entry was found at the top level, this will be in the range of 1 to the number of entries + * in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater + * than the number of entries in the top-level IFD. + * * If the entry was not found, *value is left untouched and zero is returned. - * If an error occurred, a negative number is returned. + * If an error occurred, a negative AVERROR is returned. */ int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, AVExifEntry **value); @@ -163,8 +169,16 @@ int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, * Remove an entry from the provided EXIF metadata struct. * * If the entry was present and removed successfully, a positive number is returned. - * If the entry was not found, zero is returned. - * If an error occurred, a negative number is returned. + * + * The positive number is equal to 1 plus the offset at which the entry was found. If the + * entry was found at the top level, this will be in the range of 1 to the number of entries + * in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater + * than the number of entries in the top-level IFD. This refers to the state of the IFD before + * the entry was removed, e.g. if the last entry is removed, a 1 is returned, but the IFD has + * no entries anymore. + * + * If the entry was not found, zero is returned and the IFD is left untouched. + * If an error occurred, a negative AVERROR is returned. */ int av_exif_remove_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
