diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-16 17:28:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-19 16:46:30 +0100 |
commit | b0c57206d583517a5ea35dd7f365f8260d9106f2 (patch) | |
tree | f6892799dd52035deee15b0aeac15d3c1d27b1cd /libavformat/hls.c | |
parent | d91718107c33960ad295950d7419e6dba292d723 (diff) | |
download | ffmpeg-b0c57206d583517a5ea35dd7f365f8260d9106f2.tar.gz |
avformat/hls: Require the file extension to be m3u / m3u8 for probing to succeed
If the filename isnt set by the user application then the code behaves like before
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r-- | libavformat/hls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c index 7a8610cafb..846d884cb1 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1983,6 +1983,10 @@ static int hls_probe(AVProbeData *p) * somewhere for a proper match. */ if (strncmp(p->buf, "#EXTM3U", 7)) return 0; + + if (p->filename && !av_match_ext(p->filename, "m3u8,m3u")) + return 0; + if (strstr(p->buf, "#EXT-X-STREAM-INF:") || strstr(p->buf, "#EXT-X-TARGETDURATION:") || strstr(p->buf, "#EXT-X-MEDIA-SEQUENCE:")) |