avformat/utils: add const for argument passed to ff_is_http_proto()

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2021-08-20 19:31:13 +08:00
parent 31831b611b
commit 4be3f6d2d2
2 changed files with 2 additions and 2 deletions

View File

@ -907,7 +907,7 @@ void ff_format_io_close(AVFormatContext *s, AVIOContext **pb);
* @param s AVFormatContext
* @param filename URL or file name to open for writing
*/
int ff_is_http_proto(char *filename);
int ff_is_http_proto(const char *filename);
/**
* Parse creation_time in AVFormatContext metadata if exists and warn if the

View File

@ -1802,7 +1802,7 @@ void ff_format_io_close(AVFormatContext *s, AVIOContext **pb)
*pb = NULL;
}
int ff_is_http_proto(char *filename) {
int ff_is_http_proto(const char *filename) {
const char *proto = avio_find_protocol_name(filename);
return proto ? (!av_strcasecmp(proto, "http") || !av_strcasecmp(proto, "https")) : 0;
}