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>
This commit is contained in:
Karthick Jeyapal
2017-12-29 18:11:09 +08:00
committed by Steven Liu
parent 5297ae96a1
commit e8f71ef338
3 changed files with 16 additions and 9 deletions

View File

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