diff --git a/lib/codeclib.c b/lib/codeclib.c index aa798ba04..2ba7859af 100644 --- a/lib/codeclib.c +++ b/lib/codeclib.c @@ -590,7 +590,7 @@ const codec_def_t *codec_find_by_av(enum AVCodecID id) { static const char *avc_decoder_init(decoder_t *dec, const str *fmtp, const str *extra_opts) { - AVCodec *codec = dec->def->decoder; + const AVCodec *codec = dec->def->decoder; if (!codec) return "codec not supported"; diff --git a/lib/codeclib.h b/lib/codeclib.h index b66321063..e2f98614a 100644 --- a/lib/codeclib.h +++ b/lib/codeclib.h @@ -164,8 +164,8 @@ struct codec_def_s { const codec_type_t *codec_type; // libavcodec - AVCodec *encoder; - AVCodec *decoder; + const AVCodec *encoder; + const AVCodec *decoder; }; struct format_s { @@ -250,7 +250,7 @@ struct encoder_s { union { struct { - AVCodec *codec; + const AVCodec *codec; AVCodecContext *avcctx; union {