diff mbox

[FFmpeg-devel] avformat/hls: support cache protocol in hls

Message ID 20170920030300.11321-1-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Liu Steven Sept. 20, 2017, 3:03 a.m. UTC
support play hls from cache

Signed-off-by: Steven Liu <lq@onvideo.cn>
---
 libavformat/hls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Sept. 21, 2017, 12:59 a.m. UTC | #1
On Wed, Sep 20, 2017 at 11:03:00AM +0800, Steven Liu wrote:
> support play hls from cache
> 
> Signed-off-by: Steven Liu <lq@onvideo.cn>
> ---
>  libavformat/hls.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This may be unsafe and allow bypassing the file/http checks

[...]
diff mbox

Patch

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 0995345bbf..889ae6c201 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -628,7 +628,7 @@  static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
                 url);
             return AVERROR_INVALIDDATA;
         }
-    } else if (av_strstart(proto_name, "http", NULL)) {
+    } else if (av_strstart(proto_name, "http", NULL) || av_strstart(proto_name, "cache", NULL)) {
         ;
     } else
         return AVERROR_INVALIDDATA;