avformat/voc: Deduplicate codec tags list

Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-02-18 01:42:14 +01:00
parent ef3224c911
commit e772e253cb
4 changed files with 5 additions and 2 deletions

View File

@ -35,3 +35,5 @@ const AVCodecTag ff_voc_codec_tags[] = {
{AV_CODEC_ID_ADPCM_CT, 0x0200}, {AV_CODEC_ID_ADPCM_CT, 0x0200},
{AV_CODEC_ID_NONE, 0}, {AV_CODEC_ID_NONE, 0},
}; };
const AVCodecTag *const ff_voc_codec_tags_list[] = { ff_voc_codec_tags, NULL };

View File

@ -45,6 +45,7 @@ typedef enum voc_type {
extern const unsigned char ff_voc_magic[21]; extern const unsigned char ff_voc_magic[21];
extern const AVCodecTag ff_voc_codec_tags[]; extern const AVCodecTag ff_voc_codec_tags[];
extern const AVCodecTag *const ff_voc_codec_tags_list[];
int ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, int ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt,
AVStream *st, int max_size); AVStream *st, int max_size);

View File

@ -106,5 +106,5 @@ AVInputFormat ff_voc_demuxer = {
.read_header = voc_read_header, .read_header = voc_read_header,
.read_packet = voc_read_packet, .read_packet = voc_read_packet,
.read_seek = voc_read_seek, .read_seek = voc_read_seek,
.codec_tag = (const AVCodecTag* const []){ ff_voc_codec_tags, 0 }, .codec_tag = ff_voc_codec_tags_list,
}; };

View File

@ -106,6 +106,6 @@ AVOutputFormat ff_voc_muxer = {
.write_header = voc_write_header, .write_header = voc_write_header,
.write_packet = voc_write_packet, .write_packet = voc_write_packet,
.write_trailer = voc_write_trailer, .write_trailer = voc_write_trailer,
.codec_tag = (const AVCodecTag* const []){ ff_voc_codec_tags, 0 }, .codec_tag = ff_voc_codec_tags_list,
.flags = AVFMT_NOTIMESTAMPS, .flags = AVFMT_NOTIMESTAMPS,
}; };