avformat/hls: Check that filename is not "" in probe before checking its extension
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 24 Jan 2016 19:07:48 +0000 (20:07 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 24 Jan 2016 23:18:57 +0000 (00:18 +0100)
Possibly the check as a whole causes more problems than it helps, if so dont
hesitate to remove it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/hls.c

index 846d884..dce8a5c 100644 (file)
@@ -1984,7 +1984,7 @@ static int hls_probe(AVProbeData *p)
     if (strncmp(p->buf, "#EXTM3U", 7))
         return 0;
 
-    if (p->filename && !av_match_ext(p->filename, "m3u8,m3u"))
+    if (p->filename && *p->filename && !av_match_ext(p->filename, "m3u8,m3u"))
         return 0;
 
     if (strstr(p->buf, "#EXT-X-STREAM-INF:")     ||