[FFmpeg-cvslog] avcodec: Remove deprecated av_codec_get_tag_string

Andreas Rheinhardt git at videolan.org
Wed Apr 28 00:14:32 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Feb 25 19:34:56 2021 +0100| [d1d8a818742f2429b544d38446a3510d8a23be94] | committer: James Almer

avcodec: Remove deprecated av_codec_get_tag_string

Deprecated in f156d35321bb600b2309b78185d600b2fa64d84a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1d8a818742f2429b544d38446a3510d8a23be94
---

 libavcodec/avcodec.h | 16 ----------------
 libavcodec/utils.c   | 22 ----------------------
 libavcodec/version.h |  3 ---
 3 files changed, 41 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 612135dba5..0e86064ccb 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3636,22 +3636,6 @@ enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const en
  * @}
  */
 
-#if FF_API_TAG_STRING
-/**
- * Put a string representing the codec tag codec_tag in buf.
- *
- * @param buf       buffer to place codec tag in
- * @param buf_size size in bytes of buf
- * @param codec_tag codec tag to assign
- * @return the length of the string that would have been generated if
- * enough space had been available, excluding the trailing null
- *
- * @deprecated see av_fourcc_make_string() and av_fourcc2str().
- */
-attribute_deprecated
-size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
-#endif
-
 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
 
 /**
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 81f337562e..fda50e3db4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -453,28 +453,6 @@ const char *avcodec_get_name(enum AVCodecID id)
     return "unknown_codec";
 }
 
-#if FF_API_TAG_STRING
-size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
-{
-    int i, len, ret = 0;
-
-#define TAG_PRINT(x)                                              \
-    (((x) >= '0' && (x) <= '9') ||                                \
-     ((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') ||  \
-     ((x) == '.' || (x) == ' ' || (x) == '-' || (x) == '_'))
-
-    for (i = 0; i < 4; i++) {
-        len = snprintf(buf, buf_size,
-                       TAG_PRINT(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);
-        buf        += len;
-        buf_size    = buf_size > len ? buf_size - len : 0;
-        ret        += len;
-        codec_tag >>= 8;
-    }
-    return ret;
-}
-#endif
-
 const char *av_get_profile_name(const AVCodec *codec, int profile)
 {
     const AVProfile *p;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 89d374a490..a43c44961e 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -81,9 +81,6 @@
 #ifndef FF_API_STRUCT_VAAPI_CONTEXT
 #define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
-#ifndef FF_API_TAG_STRING
-#define FF_API_TAG_STRING        (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
 #ifndef FF_API_GETCHROMA
 #define FF_API_GETCHROMA         (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif



More information about the ffmpeg-cvslog mailing list