summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.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/rtsp.c
parent1dba8371d93cf1c83bcd5c432d921905206a60f3 (diff)
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/rtsp.c')
-rw-r--r--libavformat/rtsp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 39539e9901..d710469641 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1468,8 +1468,8 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
"?localport=%d", j);
/* we will use two ports per rtp stream (rtp and rtcp) */
j += 2;
- err = ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, &opts);
+ err = ffurl_open_whitelist(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback, &opts, s->protocol_whitelist);
av_dict_free(&opts);
@@ -1611,8 +1611,8 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST);
ff_url_join(url, sizeof(url), "rtp", NULL, namebuf,
port, "%s", optbuf);
- if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, NULL) < 0) {
+ if (ffurl_open_whitelist(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback, NULL, s->protocol_whitelist) < 0) {
err = AVERROR_INVALIDDATA;
goto fail;
}
@@ -1800,8 +1800,8 @@ redirect:
ff_url_join(tcpname, sizeof(tcpname), lower_rtsp_proto, NULL,
host, port,
"?timeout=%d", rt->stimeout);
- if ((ret = ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, NULL)) < 0) {
+ if ((ret = ffurl_open_whitelist(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback, NULL, s->protocol_whitelist)) < 0) {
err = ret;
goto fail;
}
@@ -2316,8 +2316,8 @@ static int sdp_read_header(AVFormatContext *s)
append_source_addrs(url, sizeof(url), "block",
rtsp_st->nb_exclude_source_addrs,
rtsp_st->exclude_source_addrs);
- err = ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, &opts);
+ err = ffurl_open_whitelist(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback, &opts, s->protocol_whitelist);
av_dict_free(&opts);
@@ -2386,8 +2386,8 @@ static int rtp_read_header(AVFormatContext *s)
if (!ff_network_init())
return AVERROR(EIO);
- ret = ffurl_open(&in, s->filename, AVIO_FLAG_READ,
- &s->interrupt_callback, NULL);
+ ret = ffurl_open_whitelist(&in, s->filename, AVIO_FLAG_READ,
+ &s->interrupt_callback, NULL, s->protocol_whitelist);
if (ret)
goto fail;