From a247ac640df3da573cd661065bf53f37863e2b46 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 25 Feb 2021 10:50:26 +0100 Subject: avcodec: Constify AVCodecs Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt Signed-off-by: James Almer --- libavcodec/textdec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libavcodec/textdec.c') diff --git a/libavcodec/textdec.c b/libavcodec/textdec.c index 964da72ad5..c1fcc5c6cb 100644 --- a/libavcodec/textdec.c +++ b/libavcodec/textdec.c @@ -81,7 +81,7 @@ static void text_flush(AVCodecContext *avctx) #define text_options options DECLARE_CLASS(text); -AVCodec ff_text_decoder = { +const AVCodec ff_text_decoder = { .name = "text", .long_name = NULL_IF_CONFIG_SMALL("Raw text subtitle"), .priv_data_size = sizeof(TextContext), @@ -107,7 +107,7 @@ static int linebreak_init(AVCodecContext *avctx) #define vplayer_options options DECLARE_CLASS(vplayer); -AVCodec ff_vplayer_decoder = { +const AVCodec ff_vplayer_decoder = { .name = "vplayer", .long_name = NULL_IF_CONFIG_SMALL("VPlayer subtitle"), .priv_data_size = sizeof(TextContext), @@ -124,7 +124,7 @@ AVCodec ff_vplayer_decoder = { #define stl_options options DECLARE_CLASS(stl); -AVCodec ff_stl_decoder = { +const AVCodec ff_stl_decoder = { .name = "stl", .long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"), .priv_data_size = sizeof(TextContext), @@ -141,7 +141,7 @@ AVCodec ff_stl_decoder = { #define pjs_options options DECLARE_CLASS(pjs); -AVCodec ff_pjs_decoder = { +const AVCodec ff_pjs_decoder = { .name = "pjs", .long_name = NULL_IF_CONFIG_SMALL("PJS subtitle"), .priv_data_size = sizeof(TextContext), @@ -158,7 +158,7 @@ AVCodec ff_pjs_decoder = { #define subviewer1_options options DECLARE_CLASS(subviewer1); -AVCodec ff_subviewer1_decoder = { +const AVCodec ff_subviewer1_decoder = { .name = "subviewer1", .long_name = NULL_IF_CONFIG_SMALL("SubViewer1 subtitle"), .priv_data_size = sizeof(TextContext), -- cgit v1.2.3