aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/img2.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-07 21:53:54 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-11 12:53:26 +0200
commit497a0f839d7d98e182aa27044e0dbeeb89783d4b (patch)
tree296433b554d3883b5570fa6d0f8c4a19e010fe68 /libavformat/img2.h
parent1533351990ba86bbecc5883dc1ca559581a7fbc8 (diff)
downloadffmpeg-497a0f839d7d98e182aa27044e0dbeeb89783d4b.tar.gz
avformat/img2: Avoid relocations for ff_img_tags
The strings here are so short that using a pointer is wasteful (the longest string takes nine bytes; on 64 bit systems, the pointer+padding already take 12 bytes). So avoid them and add asserts to ensure that no one ever tries to use a too long tag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/img2.h')
-rw-r--r--libavformat/img2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/img2.h b/libavformat/img2.h
index 5fd8ff77fc..e98902c96f 100644
--- a/libavformat/img2.h
+++ b/libavformat/img2.h
@@ -66,7 +66,7 @@ typedef struct VideoDemuxData {
typedef struct IdStrMap {
enum AVCodecID id;
- const char *str;
+ char str[12];
} IdStrMap;
extern const IdStrMap ff_img_tags[];