diff mbox series

[FFmpeg-devel,21/29] avformat/rso: Deduplicate codec tags list

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

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/rso.c    | 2 ++
 libavformat/rso.h    | 1 +
 libavformat/rsodec.c | 2 +-
 libavformat/rsoenc.c | 2 +-
 4 files changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/rso.c b/libavformat/rso.c
index 7d88f0f5bc..765c0d0d66 100644
--- a/libavformat/rso.c
+++ b/libavformat/rso.c
@@ -28,3 +28,5 @@  const AVCodecTag ff_codec_rso_tags[] = {
     { AV_CODEC_ID_ADPCM_IMA_WAV,   0x0101 },
     { AV_CODEC_ID_NONE, 0 },
 };
+
+const AVCodecTag *const ff_rso_codec_tags_list[] = { ff_codec_rso_tags, NULL };
diff --git a/libavformat/rso.h b/libavformat/rso.h
index 1f65dd90c7..4f78b40180 100644
--- a/libavformat/rso.h
+++ b/libavformat/rso.h
@@ -28,5 +28,6 @@ 
 
 /* The libavcodec codecs we support, and the IDs they have in the file */
 extern const AVCodecTag ff_codec_rso_tags[];
+extern const AVCodecTag *const ff_rso_codec_tags_list[];
 
 #endif /* AVFORMAT_RSO_H */
diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c
index b2d9a7c403..91b86bf006 100644
--- a/libavformat/rsodec.c
+++ b/libavformat/rsodec.c
@@ -79,5 +79,5 @@  AVInputFormat ff_rso_demuxer = {
     .read_header    =   rso_read_header,
     .read_packet    =   ff_pcm_read_packet,
     .read_seek      =   ff_pcm_read_seek,
-    .codec_tag      =   (const AVCodecTag* const []){ff_codec_rso_tags, 0},
+    .codec_tag      =   ff_rso_codec_tags_list,
 };
diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c
index beba94b2a7..780538a545 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rsoenc.c
@@ -100,6 +100,6 @@  AVOutputFormat ff_rso_muxer = {
     .write_header   =   rso_write_header,
     .write_packet   =   ff_raw_write_packet,
     .write_trailer  =   rso_write_trailer,
-    .codec_tag      =   (const AVCodecTag* const []){ff_codec_rso_tags, 0},
+    .codec_tag      =   ff_rso_codec_tags_list,
     .flags          =   AVFMT_NOTIMESTAMPS,
 };