diff mbox series

[FFmpeg-devel,25/29] avformat/ast: Deduplicate codec tags lists

Message ID 20210218034214.2090223-25-andreas.rheinhardt@gmail.com
State Accepted
Commit 697066af013d480c5f947f13926731a358e15fa2
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/ast.c    | 5 ++++-
 libavformat/ast.h    | 1 +
 libavformat/astdec.c | 2 +-
 libavformat/astenc.c | 2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/ast.c b/libavformat/ast.c
index 9de74aae69..856d36f08c 100644
--- a/libavformat/ast.c
+++ b/libavformat/ast.c
@@ -19,7 +19,8 @@ 
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "avformat.h"
+#include <stddef.h>
+#include "libavcodec/codec_id.h"
 #include "internal.h"
 
 const AVCodecTag ff_codec_ast_tags[] = {
@@ -27,3 +28,5 @@  const AVCodecTag ff_codec_ast_tags[] = {
     { AV_CODEC_ID_PCM_S16BE_PLANAR,   1 },
     { AV_CODEC_ID_NONE,               0 },
 };
+
+const AVCodecTag *const ff_ast_codec_tags_list[] = { ff_codec_ast_tags, NULL };
diff --git a/libavformat/ast.h b/libavformat/ast.h
index 4a399ea410..b629f7ed43 100644
--- a/libavformat/ast.h
+++ b/libavformat/ast.h
@@ -26,5 +26,6 @@ 
 #include "internal.h"
 
 extern const AVCodecTag ff_codec_ast_tags[];
+extern const AVCodecTag *const ff_ast_codec_tags_list[];
 
 #endif /* AVFORMAT_AST_H */
diff --git a/libavformat/astdec.c b/libavformat/astdec.c
index 9d2174f70d..610c9385aa 100644
--- a/libavformat/astdec.c
+++ b/libavformat/astdec.c
@@ -118,5 +118,5 @@  AVInputFormat ff_ast_demuxer = {
     .read_packet    = ast_read_packet,
     .extensions     = "ast",
     .flags          = AVFMT_GENERIC_INDEX,
-    .codec_tag      = (const AVCodecTag* const []){ff_codec_ast_tags, 0},
+    .codec_tag      = ff_ast_codec_tags_list,
 };
diff --git a/libavformat/astenc.c b/libavformat/astenc.c
index e0b94b8b63..69541bc0ca 100644
--- a/libavformat/astenc.c
+++ b/libavformat/astenc.c
@@ -207,5 +207,5 @@  AVOutputFormat ff_ast_muxer = {
     .write_packet      = ast_write_packet,
     .write_trailer     = ast_write_trailer,
     .priv_class        = &ast_muxer_class,
-    .codec_tag         = (const AVCodecTag* const []){ff_codec_ast_tags, 0},
+    .codec_tag         = ff_ast_codec_tags_list,
 };