]> git.sesse.net Git - ffmpeg/commitdiff
avformat/voc: Deduplicate codec tags list
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 18 Feb 2021 00:42:14 +0000 (01:42 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 23 Feb 2021 10:23:29 +0000 (11:23 +0100)
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/voc.c
libavformat/voc.h
libavformat/vocdec.c
libavformat/vocenc.c

index 2a972344d3b0aedc97ecf529c96843694214451b..e4cdf8bf4966196a68fa04c3cf8e1adaefdac7ef 100644 (file)
@@ -35,3 +35,5 @@ const AVCodecTag ff_voc_codec_tags[] = {
     {AV_CODEC_ID_ADPCM_CT,    0x0200},
     {AV_CODEC_ID_NONE,             0},
 };
+
+const AVCodecTag *const ff_voc_codec_tags_list[] = { ff_voc_codec_tags, NULL };
index 1f9a8be00004047cdc4e84e7e54ddf0ce180cfd9..1fc6bb422743d5dbea97e749103e1d6656437150 100644 (file)
@@ -45,6 +45,7 @@ typedef enum voc_type {
 
 extern const unsigned char ff_voc_magic[21];
 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,
                       AVStream *st, int max_size);
index d388fce92efe15e8e87c764c0cfd1a5de18908c4..6cdc720ee74c1af97f3019be7e4cfd531757d755 100644 (file)
@@ -106,5 +106,5 @@ AVInputFormat ff_voc_demuxer = {
     .read_header    = voc_read_header,
     .read_packet    = voc_read_packet,
     .read_seek      = voc_read_seek,
-    .codec_tag      = (const AVCodecTag* const []){ ff_voc_codec_tags, 0 },
+    .codec_tag      = ff_voc_codec_tags_list,
 };
index 321b113032e9fb531d550ce96fcb09dc2a816fc6..bdc63843c432b4d2e4290930aa694fe19b1e3a9b 100644 (file)
@@ -106,6 +106,6 @@ AVOutputFormat ff_voc_muxer = {
     .write_header      = voc_write_header,
     .write_packet      = voc_write_packet,
     .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,
 };