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

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
pull/369/head
Limin Wang 4 years ago
parent 31831b611b
commit 4be3f6d2d2
  1. 2
      libavformat/internal.h
  2. 2
      libavformat/utils.c

@ -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

@ -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;
}

Loading…
Cancel
Save