[FFmpeg-cvslog] avformat/hls: Require the file extension to be m3u / m3u8 for probing to succeed

Michael Niedermayer git at videolan.org
Tue Jan 19 17:35:27 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jan 16 17:28:34 2016 +0100| [b0c57206d583517a5ea35dd7f365f8260d9106f2] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0c57206d583517a5ea35dd7f365f8260d9106f2
---

 libavformat/hls.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 7a8610c..846d884 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:"))



More information about the ffmpeg-cvslog mailing list