summaryrefslogtreecommitdiff
path: root/libavcodec/codec_internal.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-29 13:38:02 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-03 15:42:57 +0200
commit48286d4d98e6417dff397d6f15e6b2ca3310f0ca (patch)
tree32ee2a1b56b100f84a1fffcf5e888ce2f3a49e49 /libavcodec/codec_internal.h
parentdea974456035d8d43c69a23b9db036a544bb0455 (diff)
avcodec/codec_internal: Add macro to set AVCodec.long_name
It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/codec_internal.h')
-rw-r--r--libavcodec/codec_internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/codec_internal.h b/libavcodec/codec_internal.h
index 62ea91cf4d..310e243d84 100644
--- a/libavcodec/codec_internal.h
+++ b/libavcodec/codec_internal.h
@@ -23,6 +23,7 @@
#include "libavutil/attributes.h"
#include "codec.h"
+#include "config.h"
/**
* The codec is not known to be init-threadsafe (i.e. it might be unsafe
@@ -257,6 +258,12 @@ typedef struct FFCodec {
const uint32_t *codec_tags;
} FFCodec;
+#if CONFIG_SMALL
+#define CODEC_LONG_NAME(str) .p.long_name = NULL
+#else
+#define CODEC_LONG_NAME(str) .p.long_name = str
+#endif
+
#define FF_CODEC_DECODE_CB(func) \
.cb_type = FF_CODEC_CB_TYPE_DECODE, \
.cb.decode = (func)