avformat/dashenc: Avoid relocations for short strings

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-09-06 17:13:01 +02:00
parent c95cdf871c
commit 90f444ef74

View File

@ -207,14 +207,14 @@ typedef struct DASHContext {
static const struct codec_string { static const struct codec_string {
enum AVCodecID id; enum AVCodecID id;
const char *str; const char str[8];
} codecs[] = { } codecs[] = {
{ AV_CODEC_ID_VP8, "vp8" }, { AV_CODEC_ID_VP8, "vp8" },
{ AV_CODEC_ID_VP9, "vp9" }, { AV_CODEC_ID_VP9, "vp9" },
{ AV_CODEC_ID_VORBIS, "vorbis" }, { AV_CODEC_ID_VORBIS, "vorbis" },
{ AV_CODEC_ID_OPUS, "opus" }, { AV_CODEC_ID_OPUS, "opus" },
{ AV_CODEC_ID_FLAC, "flac" }, { AV_CODEC_ID_FLAC, "flac" },
{ AV_CODEC_ID_NONE, NULL } { AV_CODEC_ID_NONE }
}; };
static int dashenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename, static int dashenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename,