[vlc-commits] stream_filter: httplive: extend probing to 2K (fix #15134)

Francois Cartegnie git at videolan.org
Wed Dec 2 15:54:33 CET 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec  2 15:48:28 2015 +0100| [5b8bcefede40abe2db5c6837ca28836c43530d3e] | committer: Jean-Baptiste Kempf

stream_filter: httplive: extend probing to 2K (fix #15134)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=5b8bcefede40abe2db5c6837ca28836c43530d3e
---

 modules/stream_filter/httplive.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 5eb5405..ed88c7f 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -184,13 +184,17 @@ static bool isHTTPLiveStreaming(stream_t *s)
 {
     const uint8_t *peek;
 
-    int size = stream_Peek(s->p_source, &peek, 46);
+    int size = stream_Peek(s->p_source, &peek, 7);
     if (size < 7)
         return false;
 
     if (memcmp(peek, "#EXTM3U", 7) != 0)
         return false;
 
+    size = stream_Peek(s->p_source, &peek, 2048);
+    if (unlikely(size < 7))
+        return false;
+
     peek += 7;
     size -= 7;
 



More information about the vlc-commits mailing list