summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-25 01:53:40 +0100
committerJames Almer <jamrial@gmail.com>2021-04-27 10:43:14 -0300
commit46dac8cf3d250184ab4247809bc03f60e14f4c0c (patch)
treec5fabc231ab840ba7cafbe0e722dff0fe2148dd7 /libavformat
parent626535f6a169e2d821b969e0ea77125ba7482113 (diff)
downloadffmpeg-46dac8cf3d250184ab4247809bc03f60e14f4c0c.tar.gz
avformat/avformat, utils: Make av_find_best_stream const-correct
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavformat/utils.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 23bdaa207b..28069d45dc 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2070,7 +2070,7 @@ int av_find_best_stream(AVFormatContext *ic,
enum AVMediaType type,
int wanted_stream_nb,
int related_stream,
- AVCodec **decoder_ret,
+ const AVCodec **decoder_ret,
int flags);
/**
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7078891dc0..2f66f539a6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -4200,7 +4200,7 @@ AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int
int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type,
int wanted_stream_nb, int related_stream,
- AVCodec **decoder_ret, int flags)
+ const AVCodec **decoder_ret, int flags)
{
int i, nb_streams = ic->nb_streams;
int ret = AVERROR_STREAM_NOT_FOUND;
@@ -4260,7 +4260,7 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type,
}
}
if (decoder_ret)
- *decoder_ret = (AVCodec*)best_decoder;
+ *decoder_ret = best_decoder;
return ret;
}