diff mbox series

[FFmpeg-devel,19/29] avformat/caf: Deduplicate codec tags list

Message ID 20210218034214.2090223-19-andreas.rheinhardt@gmail.com
State Accepted
Commit ef3224c911cca43700f1df7fbee3741a320afe28
Headers show
Series [FFmpeg-devel,01/29] configure, libavcodec/Makefile: Remove spurious CAF demuxer dependencies | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 18, 2021, 3:42 a.m. UTC
Also saves a relocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/caf.c    | 1 +
 libavformat/caf.h    | 1 +
 libavformat/cafdec.c | 2 +-
 libavformat/cafenc.c | 2 +-
 4 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/caf.c b/libavformat/caf.c
index fe242ff032..a700e4055b 100644
--- a/libavformat/caf.c
+++ b/libavformat/caf.c
@@ -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 };
diff --git a/libavformat/caf.h b/libavformat/caf.h
index 9c25f2c683..ed0392b1f1 100644
--- a/libavformat/caf.h
+++ b/libavformat/caf.h
@@ -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 */
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index b7a9711cc5..d56187f71f 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -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,
 };
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index 98d4d9212f..7e44797a52 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -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,
 };