]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit 'd44f3e4059506a182f59218b1e967d42b01e097c'
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Mon, 18 Apr 2016 14:35:12 +0000 (15:35 +0100)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Mon, 18 Apr 2016 14:35:12 +0000 (15:35 +0100)
* commit 'd44f3e4059506a182f59218b1e967d42b01e097c':
  avio: Apply avoptions on the URLContext itself as well

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
1  2 
libavformat/avio.c

index 6bfa67f3ba22a6093ef76c18d8cb74063344a54f,4da6b7416504787df7fd30e53822f3ae1301750c..4b10dd8f39575a64b3740ab8a9242523bb865206
@@@ -302,15 -169,16 +302,18 @@@ int ffurl_alloc(URLContext **puc, cons
      return AVERROR_PROTOCOL_NOT_FOUND;
  }
  
 -int ffurl_open(URLContext **puc, const char *filename, int flags,
 -               const AVIOInterruptCB *int_cb, AVDictionary **options,
 -               const URLProtocol **protocols)
 +int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags,
 +                         const AVIOInterruptCB *int_cb, AVDictionary **options,
 +                         const char *whitelist, const char* blacklist)
  {
 -    int ret = ffurl_alloc(puc, filename, flags, int_cb, protocols);
 -    if (ret)
 +    AVDictionary *tmp_opts = NULL;
 +    AVDictionaryEntry *e;
 +    int ret = ffurl_alloc(puc, filename, flags, int_cb);
 +    if (ret < 0)
          return ret;
+     if (options &&
+         (ret = av_opt_set_dict(*puc, options)) < 0)
+         goto fail;
      if (options && (*puc)->prot->priv_data_class &&
          (ret = av_opt_set_dict((*puc)->priv_data, options)) < 0)
          goto fail;