You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
@@ -1983,6 +1983,10 @@ static int hls_probe(AVProbeData *p)
|
|||||||
* somewhere for a proper match. */
|
* somewhere for a proper match. */
|
||||||
if (strncmp(p->buf, "#EXTM3U", 7))
|
if (strncmp(p->buf, "#EXTM3U", 7))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (p->filename && !av_match_ext(p->filename, "m3u8,m3u"))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (strstr(p->buf, "#EXT-X-STREAM-INF:") ||
|
if (strstr(p->buf, "#EXT-X-STREAM-INF:") ||
|
||||||
strstr(p->buf, "#EXT-X-TARGETDURATION:") ||
|
strstr(p->buf, "#EXT-X-TARGETDURATION:") ||
|
||||||
strstr(p->buf, "#EXT-X-MEDIA-SEQUENCE:"))
|
strstr(p->buf, "#EXT-X-MEDIA-SEQUENCE:"))
|
||||||
|
Reference in New Issue
Block a user