]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hls.c
avformat/hls: Require the file extension to be m3u / m3u8 for probing to succeed
[ffmpeg] / libavformat / hls.c
index 7a8610cafb530872e1a1ab23fc0713535e4adf50..846d884cb1341d1228d208ac3df390b5326736e5 100644 (file)
@@ -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:"))