* [FFmpeg-devel] [PATCH] avcodec/tiff_common: Remove unused ff_tadd_*_metadata() funcs (PR #20592)
@ 2025-09-24 3:05 mkver via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: mkver via ffmpeg-devel @ 2025-09-24 3:05 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: mkver
PR #20592 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20592
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20592.patch
Unused since ad77345a5d14862f4701e5ad422b03b14934a5b9.
>From 6bd29f31912942e10c4d03ce180ea34baaaef08f Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Wed, 24 Sep 2025 05:01:04 +0200
Subject: [PATCH] avcodec/tiff_common: Remove unused ff_tadd_*_metadata() funcs
Unused since ad77345a5d14862f4701e5ad422b03b14934a5b9.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/tiff_common.c | 67 ----------------------------------------
libavcodec/tiff_common.h | 18 -----------
2 files changed, 85 deletions(-)
diff --git a/libavcodec/tiff_common.c b/libavcodec/tiff_common.c
index ee8061944b..265f843031 100644
--- a/libavcodec/tiff_common.c
+++ b/libavcodec/tiff_common.c
@@ -97,51 +97,6 @@ static int bprint_to_avdict(AVBPrint *bp, const char *name,
return av_dict_set(metadata, name, ap, AV_DICT_DONT_STRDUP_VAL);
}
-int ff_tadd_rational_metadata(int count, const char *name, const char *sep,
- GetByteContext *gb, int le, AVDictionary **metadata)
-{
- AVBPrint bp;
- int32_t nom, denom;
- int i;
-
- if (count >= INT_MAX / sizeof(int64_t) || count <= 0)
- return AVERROR_INVALIDDATA;
- if (bytestream2_get_bytes_left(gb) < count * sizeof(int64_t))
- return AVERROR_INVALIDDATA;
-
- av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_UNLIMITED);
-
- for (i = 0; i < count; i++) {
- nom = ff_tget_long(gb, le);
- denom = ff_tget_long(gb, le);
- av_bprintf(&bp, "%s%7"PRId32":%-7"PRId32, auto_sep(count, sep, i, 4), nom, denom);
- }
-
- return bprint_to_avdict(&bp, name, metadata);
-}
-
-
-int ff_tadd_long_metadata(int count, const char *name, const char *sep,
- GetByteContext *gb, int le, AVDictionary **metadata)
-{
- AVBPrint bp;
- int i;
-
- if (count >= INT_MAX / sizeof(int32_t) || count <= 0)
- return AVERROR_INVALIDDATA;
- if (bytestream2_get_bytes_left(gb) < count * sizeof(int32_t))
- return AVERROR_INVALIDDATA;
-
- av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_UNLIMITED);
-
- for (i = 0; i < count; i++) {
- av_bprintf(&bp, "%s%7i", auto_sep(count, sep, i, 8), ff_tget_long(gb, le));
- }
-
- return bprint_to_avdict(&bp, name, metadata);
-}
-
-
int ff_tadd_doubles_metadata(int count, const char *name, const char *sep,
GetByteContext *gb, int le, AVDictionary **metadata)
{
@@ -184,28 +139,6 @@ int ff_tadd_shorts_metadata(int count, const char *name, const char *sep,
return bprint_to_avdict(&bp, name, metadata);
}
-
-int ff_tadd_bytes_metadata(int count, const char *name, const char *sep,
- GetByteContext *gb, int le, int is_signed, AVDictionary **metadata)
-{
- AVBPrint bp;
- int i;
-
- if (count >= INT_MAX / sizeof(int8_t) || count < 0)
- return AVERROR_INVALIDDATA;
- if (bytestream2_get_bytes_left(gb) < count * sizeof(int8_t))
- return AVERROR_INVALIDDATA;
-
- av_bprint_init(&bp, 10 * count, AV_BPRINT_SIZE_UNLIMITED);
-
- for (i = 0; i < count; i++) {
- int v = is_signed ? (int8_t)bytestream2_get_byte(gb) : bytestream2_get_byte(gb);
- av_bprintf(&bp, "%s%3i", auto_sep(count, sep, i, 16), v);
- }
-
- return bprint_to_avdict(&bp, name, metadata);
-}
-
int ff_tadd_string_metadata(int count, const char *name,
GetByteContext *gb, int le, AVDictionary **metadata)
{
diff --git a/libavcodec/tiff_common.h b/libavcodec/tiff_common.h
index 11f2e739a4..67f23bd4fa 100644
--- a/libavcodec/tiff_common.h
+++ b/libavcodec/tiff_common.h
@@ -62,18 +62,6 @@ double ff_tget_double(GetByteContext *gb, int le);
/** Reads a byte from the bytestream using given endianness. */
unsigned ff_tget(GetByteContext *gb, int type, int le);
-/** Adds count rationals converted to a string
- * into the metadata dictionary.
- */
-int ff_tadd_rational_metadata(int count, const char *name, const char *sep,
- GetByteContext *gb, int le, AVDictionary **metadata);
-
-/** Adds count longs converted to a string
- * into the metadata dictionary.
- */
-int ff_tadd_long_metadata(int count, const char *name, const char *sep,
- GetByteContext *gb, int le, AVDictionary **metadata);
-
/** Adds count doubles converted to a string
* into the metadata dictionary.
*/
@@ -86,12 +74,6 @@ int ff_tadd_doubles_metadata(int count, const char *name, const char *sep,
int ff_tadd_shorts_metadata(int count, const char *name, const char *sep,
GetByteContext *gb, int le, int is_signed, AVDictionary **metadata);
-/** Adds count bytes converted to a string
- * into the metadata dictionary.
- */
-int ff_tadd_bytes_metadata(int count, const char *name, const char *sep,
- GetByteContext *gb, int le, int is_signed, AVDictionary **metadata);
-
/** Adds a string of count characters
* into the metadata dictionary.
*/
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-24 3:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24 3:05 [FFmpeg-devel] [PATCH] avcodec/tiff_common: Remove unused ff_tadd_*_metadata() funcs (PR #20592) mkver via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ http://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git