summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-07 05:52:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-07 06:15:02 +0200
commit134206ca7a3d395c827e6a041f7f01e5fb9e1693 (patch)
tree80b59cf916c31f6f4ca5fcd98a96e280a4fb046d /libavformat
parent8dd435f0cf2f0befab8d34e6e0d1beb2f46fc4ac (diff)
avformat/utils: fix const warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 26fb0b9da8..4f5b310d83 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -120,7 +120,7 @@ void av_format_inject_global_side_data(AVFormatContext *s)
}
}
-static AVCodec *find_decoder(AVFormatContext *s, AVStream *st, enum AVCodecID codec_id)
+static const AVCodec *find_decoder(AVFormatContext *s, AVStream *st, enum AVCodecID codec_id)
{
if (st->codec->codec)
return st->codec->codec;
@@ -3473,7 +3473,7 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type,
int i, nb_streams = ic->nb_streams;
int ret = AVERROR_STREAM_NOT_FOUND, best_count = -1, best_bitrate = -1, best_multiframe = -1, count, bitrate, multiframe;
unsigned *program = NULL;
- AVCodec *decoder = NULL, *best_decoder = NULL;
+ const AVCodec *decoder = NULL, *best_decoder = NULL;
if (related_stream >= 0 && wanted_stream_nb < 0) {
AVProgram *p = av_find_program_from_stream(ic, NULL, related_stream);
@@ -3524,7 +3524,7 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type,
}
}
if (decoder_ret)
- *decoder_ret = best_decoder;
+ *decoder_ret = (AVCodec*)best_decoder;
return ret;
}