summaryrefslogtreecommitdiff
path: root/libavformat/mmsh.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-02-03 01:01:34 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-05 16:18:49 +0200
commita16018461b2f5c652b246a9aed1ab04623e96470 (patch)
tree7fd6ec79863f029090b69ce2e620227a51718894 /libavformat/mmsh.c
parent04a8bbca9289a4ee203f90bb8d48166bf53015e6 (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/mmsh.c')
-rw-r--r--libavformat/mmsh.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index d18e2d8061..13c0ffe438 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -246,6 +246,14 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim
host, port, mmsh->request_seq++);
av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0);
+ if (!mms->mms_hd->protocol_whitelist && h->protocol_whitelist) {
+ mms->mms_hd->protocol_whitelist = av_strdup(h->protocol_whitelist);
+ if (!mms->mms_hd->protocol_whitelist) {
+ err = AVERROR(ENOMEM);
+ goto fail;
+ }
+ }
+
err = ffurl_connect(mms->mms_hd, NULL);
if (err) {
goto fail;
@@ -410,4 +418,5 @@ const URLProtocol ff_mmsh_protocol = {
.url_read_seek = mmsh_read_seek,
.priv_data_size = sizeof(MMSHContext),
.flags = URL_PROTOCOL_FLAG_NETWORK,
+ .default_whitelist = "http,tcp",
};