diff options
author | Karthick Jeyapal <kjeyapal@akamai.com> | 2017-12-29 18:11:09 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2017-12-29 18:11:09 +0800 |
commit | e8f71ef338998458bbbaf09a11bc07f07fbc7954 (patch) | |
tree | b998e620eef9ae604b88fc1efb96d16b3b102d18 /libavformat/utils.c | |
parent | 5297ae96a13f615431c9a4cc38cac13c4140b07e (diff) | |
download | ffmpeg-e8f71ef338998458bbbaf09a11bc07f07fbc7954.tar.gz |
avformat/hlsenc, utils: Moved is_http_proto from hlsenc to utils for re-use
Reviewed-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Steven Liu <lq@onvideo.cn>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 9b46bd6737..2185a6f05b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -5472,6 +5472,11 @@ void ff_format_io_close(AVFormatContext *s, AVIOContext **pb) *pb = NULL; } +int ff_is_http_proto(char *filename) { + const char *proto = avio_find_protocol_name(filename); + return proto ? (!av_strcasecmp(proto, "http") || !av_strcasecmp(proto, "https")) : 0; +} + int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds) { AVDictionaryEntry *entry; |