diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-30 02:17:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-02 04:16:50 +0100 |
commit | fe3fed0b143ef6bf2d9b65ce05d55aba4224429e (patch) | |
tree | 45ead8f324a1e5190ea4905cb574325a3d9196bd /libavformat/hlsproto.c | |
parent | 1dba8371d93cf1c83bcd5c432d921905206a60f3 (diff) | |
download | android_external_ffmpeg-fe3fed0b143ef6bf2d9b65ce05d55aba4224429e.tar.gz android_external_ffmpeg-fe3fed0b143ef6bf2d9b65ce05d55aba4224429e.tar.bz2 android_external_ffmpeg-fe3fed0b143ef6bf2d9b65ce05d55aba4224429e.zip |
Update demuxers and protocols for protocol whitelist support
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/hlsproto.c')
-rw-r--r-- | libavformat/hlsproto.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c index 92843df258..b8f2f3796b 100644 --- a/libavformat/hlsproto.c +++ b/libavformat/hlsproto.c @@ -28,6 +28,7 @@ #include "libavutil/avstring.h" #include "libavutil/time.h" #include "avformat.h" +#include "avio_internal.h" #include "internal.h" #include "url.h" #include "version.h" @@ -116,8 +117,9 @@ static int parse_playlist(URLContext *h, const char *url) char line[1024]; const char *ptr; - if ((ret = avio_open2(&in, url, AVIO_FLAG_READ, - &h->interrupt_callback, NULL)) < 0) + if ((ret = ffio_open_whitelist(&in, url, AVIO_FLAG_READ, + &h->interrupt_callback, NULL, + h->protocol_whitelist)) < 0) return ret; read_chomp_line(in, line, sizeof(line)); @@ -303,8 +305,9 @@ retry: } url = s->segments[s->cur_seq_no - s->start_seq_no]->url, av_log(h, AV_LOG_DEBUG, "opening %s\n", url); - ret = ffurl_open(&s->seg_hd, url, AVIO_FLAG_READ, - &h->interrupt_callback, NULL); + ret = ffurl_open_whitelist(&s->seg_hd, url, AVIO_FLAG_READ, + &h->interrupt_callback, NULL, + h->protocol_whitelist); if (ret < 0) { if (ff_check_interrupt(&h->interrupt_callback)) return AVERROR_EXIT; |