aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-10 22:11:57 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-11 14:42:36 +0200
commit0086432fc72f6671d23ca67ede7e8bc18af7124e (patch)
treef2d236a7820442417cf76aa29318e7a16ece1ffd /libavcodec
parentb091df721050df77d537cee8156fe1a4406b1afb (diff)
downloadffmpeg-0086432fc72f6671d23ca67ede7e8bc18af7124e.tar.gz
fftools, libavcodec, libavfilter: Add const to some AVCodec *
The user has no business modifying the underlying AVCodec. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avrndec.c2
-rw-r--r--libavcodec/utils.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c
index a7bdab280d..f4ec490de5 100644
--- a/libavcodec/avrndec.c
+++ b/libavcodec/avrndec.c
@@ -46,7 +46,7 @@ static av_cold int init(AVCodecContext *avctx)
}
if(a->is_mjpeg) {
- AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MJPEG);
+ const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MJPEG);
AVDictionary *thread_opt = NULL;
if (!codec) {
av_log(avctx, AV_LOG_ERROR, "MJPEG codec not found\n");
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 2e5185f364..d93a0953fa 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -695,7 +695,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
if ((avctx->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) &&
avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
const char *codec_string = av_codec_is_encoder(codec) ? "encoder" : "decoder";
- AVCodec *codec2;
+ const AVCodec *codec2;
av_log(avctx, AV_LOG_ERROR,
"The %s '%s' is experimental but experimental codecs are not enabled, "
"add '-strict %d' if you want to use it.\n",
@@ -1193,7 +1193,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
const char *avcodec_get_name(enum AVCodecID id)
{
const AVCodecDescriptor *cd;
- AVCodec *codec;
+ const AVCodec *codec;
if (id == AV_CODEC_ID_NONE)
return "none";