]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '7d61dc95d741ca134d59b1f34c4e10c4c4e36f56'
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Mon, 29 Feb 2016 16:59:47 +0000 (16:59 +0000)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Mon, 29 Feb 2016 17:00:44 +0000 (17:00 +0000)
* commit '7d61dc95d741ca134d59b1f34c4e10c4c4e36f56':
  lavf: move urlcontext_child_class_next() to protocols.c

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

index ef4253cbb9dd3cb18e04130fdad9496fab3fc7ff,b4e57e943a7f479e335efa67c7a09cabd08fab98..4a29827935822cdf1990665efd463e85ff44650a
@@@ -50,32 -49,7 +50,14 @@@ static void *urlcontext_child_next(voi
      return NULL;
  }
  
- static const AVClass *urlcontext_child_class_next(const AVClass *prev)
- {
-     int i;
-     /* find the protocol that corresponds to prev */
-     for (i = 0; ff_url_protocols[i]; i++) {
-         if (ff_url_protocols[i]->priv_data_class == prev) {
-             i++;
-             break;
-         }
-     }
-     /* find next protocol with priv options */
-     for (; ff_url_protocols[i]; i++)
-         if (ff_url_protocols[i]->priv_data_class)
-             return ff_url_protocols[i]->priv_data_class;
-     return NULL;
- }
 -static const AVOption options[] = { { NULL } };
 +#define OFFSET(x) offsetof(URLContext,x)
 +#define E AV_OPT_FLAG_ENCODING_PARAM
 +#define D AV_OPT_FLAG_DECODING_PARAM
 +static const AVOption options[] = {
 +    {"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL },  CHAR_MIN, CHAR_MAX, D },
 +    { NULL }
 +};
++
  const AVClass ffurl_context_class = {
      .class_name       = "URLContext",
      .item_name        = urlcontext_to_name,
Simple merge
index 085c24c628358ff1bd73121a317f9930adecfb60,3006905446f06bb929501d7c33db041915ca4866..810fd147b157d564c482f68d7372412b32e9328f
@@@ -302,13 -264,8 +302,15 @@@ int ff_url_join(char *str, int size, co
  void ff_make_absolute_url(char *buf, int size, const char *base,
                            const char *rel);
  
 +/**
 + * Allocate directory entry with default values.
 + *
 + * @return entry or NULL on error
 + */
 +AVIODirEntry *ff_alloc_dir_entry(void);
 +
+ const AVClass *ff_urlcontext_child_class_next(const AVClass *prev);
  extern const URLProtocol *ff_url_protocols[];
  
  #endif /* AVFORMAT_URL_H */