diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-07 21:53:54 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-11 12:53:26 +0200 |
commit | 497a0f839d7d98e182aa27044e0dbeeb89783d4b (patch) | |
tree | 296433b554d3883b5570fa6d0f8c4a19e010fe68 /libavformat/img2.h | |
parent | 1533351990ba86bbecc5883dc1ca559581a7fbc8 (diff) | |
download | ffmpeg-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.h | 2 |
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[]; |