diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-02-03 01:01:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-05 16:18:49 +0200 |
commit | a16018461b2f5c652b246a9aed1ab04623e96470 (patch) | |
tree | 7fd6ec79863f029090b69ce2e620227a51718894 /libavformat/rtmphttp.c | |
parent | 04a8bbca9289a4ee203f90bb8d48166bf53015e6 (diff) |
lavf: forward protocol_whitelist for the remaining cases
Also set a default_whitelist for mmsh and ffrtmphttp.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/rtmphttp.c')
-rw-r--r-- | libavformat/rtmphttp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c index 31f5d43232..e5ce10ca4f 100644 --- a/libavformat/rtmphttp.c +++ b/libavformat/rtmphttp.c @@ -220,6 +220,14 @@ static int rtmp_http_open(URLContext *h, const char *uri, int flags) av_opt_set(rt->stream->priv_data, "multiple_requests", "1", 0); av_opt_set_bin(rt->stream->priv_data, "post_data", "", 1, 0); + if (!rt->stream->protocol_whitelist && h->protocol_whitelist) { + rt->stream->protocol_whitelist = av_strdup(h->protocol_whitelist); + if (!rt->stream->protocol_whitelist) { + ret = AVERROR(ENOMEM); + goto fail; + } + } + /* open the http context */ if ((ret = ffurl_connect(rt->stream, NULL)) < 0) goto fail; @@ -274,4 +282,5 @@ const URLProtocol ff_ffrtmphttp_protocol = { .priv_data_size = sizeof(RTMP_HTTPContext), .flags = URL_PROTOCOL_FLAG_NETWORK, .priv_data_class= &ffrtmphttp_class, + .default_whitelist = "https,http,tcp,tls", }; |