aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtspdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-01-30 02:17:51 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-02 04:16:50 +0100
commitfe3fed0b143ef6bf2d9b65ce05d55aba4224429e (patch)
tree45ead8f324a1e5190ea4905cb574325a3d9196bd /libavformat/rtspdec.c
parent1dba8371d93cf1c83bcd5c432d921905206a60f3 (diff)
downloadffmpeg-fe3fed0b143ef6bf2d9b65ce05d55aba4224429e.tar.gz
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/rtspdec.c')
-rw-r--r--libavformat/rtspdec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index 77389b6ea6..17f04c0254 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -294,8 +294,9 @@ static int rtsp_read_setup(AVFormatContext *s, char* host, char *controlurl)
av_dict_set(&opts, "buffer_size", buf, 0);
ff_url_join(url, sizeof(url), "rtp", NULL, host, localport, NULL);
av_log(s, AV_LOG_TRACE, "Opening: %s", url);
- ret = ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, &opts);
+ ret = ffurl_open_whitelist(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback, &opts,
+ s->protocol_whitelist);
av_dict_free(&opts);
if (ret)
localport += 2;
@@ -662,8 +663,9 @@ static int rtsp_listen(AVFormatContext *s)
ff_url_join(tcpname, sizeof(tcpname), lower_proto, NULL, host, port,
"?listen&listen_timeout=%d", rt->initial_timeout * 1000);
- if (ret = ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, NULL)) {
+ if (ret = ffurl_open_whitelist(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback, NULL,
+ s->protocol_whitelist)) {
av_log(s, AV_LOG_ERROR, "Unable to open RTSP for listening\n");
return ret;
}