From fe3fed0b143ef6bf2d9b65ce05d55aba4224429e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 30 Jan 2016 02:17:51 +0100 Subject: Update demuxers and protocols for protocol whitelist support Reviewed-by: Andreas Cadhalpun Signed-off-by: Michael Niedermayer --- libavformat/rtmpproto.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libavformat/rtmpproto.c') diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index bd1c38a161..a5485ab9e8 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1118,8 +1118,9 @@ static int rtmp_calc_swfhash(URLContext *s) int ret = 0; /* Get the SWF player file. */ - if ((ret = ffurl_open(&stream, rt->swfverify, AVIO_FLAG_READ, - &s->interrupt_callback, NULL)) < 0) { + if ((ret = ffurl_open_whitelist(&stream, rt->swfverify, AVIO_FLAG_READ, + &s->interrupt_callback, NULL, + s->protocol_whitelist)) < 0) { av_log(s, AV_LOG_ERROR, "Cannot open connection %s.\n", rt->swfverify); goto fail; } @@ -2647,8 +2648,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) } reconnect: - if ((ret = ffurl_open(&rt->stream, buf, AVIO_FLAG_READ_WRITE, - &s->interrupt_callback, &opts)) < 0) { + if ((ret = ffurl_open_whitelist(&rt->stream, buf, AVIO_FLAG_READ_WRITE, + &s->interrupt_callback, &opts, + s->protocol_whitelist)) < 0) { av_log(s , AV_LOG_ERROR, "Cannot open connection %s\n", buf); goto fail; } -- cgit v1.2.3