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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/caf.c
libavformat/caf.h
libavformat/cafdec.c
libavformat/cafenc.c

index fe242ff03272425ced1067e8ed35e8ee385be5f8..a700e4055b198da2e753ca6607a891385dceb1ce 100644 (file)
@@ -78,3 +78,4 @@ const AVCodecTag ff_codec_caf_tags[] = {
     { AV_CODEC_ID_NONE,            0 },
 };
 
+const AVCodecTag *const ff_caf_codec_tags_list[] = { ff_codec_caf_tags, NULL };
index 9c25f2c683228fe47f7ebcdc37bda305e05e732d..ed0392b1f187f431fe76f5225a3baf67e34a003e 100644 (file)
@@ -30,5 +30,6 @@
 #include "internal.h"
 
 extern const AVCodecTag ff_codec_caf_tags[];
+extern const AVCodecTag *const ff_caf_codec_tags_list[];
 
 #endif /* AVFORMAT_CAF_H */
index b7a9711cc596082783a5c6107af794fd61f88d42..d56187f71f76b2d54d8a28ffd2967f2280caa2a1 100644 (file)
@@ -460,5 +460,5 @@ AVInputFormat ff_caf_demuxer = {
     .read_header    = read_header,
     .read_packet    = read_packet,
     .read_seek      = read_seek,
-    .codec_tag      = (const AVCodecTag* const []){ ff_codec_caf_tags, 0 },
+    .codec_tag      = ff_caf_codec_tags_list,
 };
index 98d4d9212f088383552bf73954a5507d98998a21..7e44797a5201f40749356f8a097d8a93c26f69c8 100644 (file)
@@ -274,5 +274,5 @@ AVOutputFormat ff_caf_muxer = {
     .write_header   = caf_write_header,
     .write_packet   = caf_write_packet,
     .write_trailer  = caf_write_trailer,
-    .codec_tag      = (const AVCodecTag* const []){ff_codec_caf_tags, 0},
+    .codec_tag      = ff_caf_codec_tags_list,
 };