diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 3358e2df1f..66638c8f22 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2584,7 +2584,8 @@ int av_match_ext(const char *filename, const char *extensions); * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot. * A negative number if this information is not available. */ -int avformat_query_codec(AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance); +int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, + int std_compliance); /** * @defgroup riff_fourcc RIFF FourCCs diff --git a/libavformat/utils.c b/libavformat/utils.c index e095d601e1..9404118b96 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4171,7 +4171,7 @@ int64_t ff_iso8601_to_unix_time(const char *datestr) return av_timegm(&time1); } -int avformat_query_codec(AVOutputFormat *ofmt, enum AVCodecID codec_id, +int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance) { if (ofmt) {