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/rtpproto.c | |
parent | 1dba8371d93cf1c83bcd5c432d921905206a60f3 (diff) | |
download | ffmpeg-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/rtpproto.c')
-rw-r--r-- | libavformat/rtpproto.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index e0aa23e89b..538a7b24ea 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -380,7 +380,8 @@ static int rtp_open(URLContext *h, const char *uri, int flags) build_udp_url(s, buf, sizeof(buf), hostname, rtp_port, s->local_rtpport, sources, block); - if (ffurl_open(&s->rtp_hd, buf, flags, &h->interrupt_callback, NULL) < 0) + if (ffurl_open_whitelist(&s->rtp_hd, buf, flags, &h->interrupt_callback, + NULL, h->protocol_whitelist) < 0) goto fail; s->local_rtpport = ff_udp_get_local_port(s->rtp_hd); if(s->local_rtpport == 65535) { @@ -392,7 +393,9 @@ static int rtp_open(URLContext *h, const char *uri, int flags) build_udp_url(s, buf, sizeof(buf), hostname, s->rtcp_port, s->local_rtcpport, sources, block); - if (ffurl_open(&s->rtcp_hd, buf, flags, &h->interrupt_callback, NULL) < 0) { + if (ffurl_open_whitelist(&s->rtcp_hd, buf, flags, + &h->interrupt_callback, NULL, + h->protocol_whitelist) < 0) { s->local_rtpport = s->local_rtcpport = -1; continue; } @@ -401,7 +404,8 @@ static int rtp_open(URLContext *h, const char *uri, int flags) build_udp_url(s, buf, sizeof(buf), hostname, s->rtcp_port, s->local_rtcpport, sources, block); - if (ffurl_open(&s->rtcp_hd, buf, flags, &h->interrupt_callback, NULL) < 0) + if (ffurl_open_whitelist(&s->rtcp_hd, buf, flags, &h->interrupt_callback, + NULL, h->protocol_whitelist) < 0) goto fail; break; } |