Browse Source

crypto should allow passing of options to the underlying protocol via the url_open2 interface

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Duncan Salerno Michael Niedermayer 12 years ago
parent
commit
f3f35f7430
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavformat/crypto.c

+ 3
- 3
libavformat/crypto.c View File

@@ -59,7 +59,7 @@ static const AVClass crypto_class = {
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
}; };


static int crypto_open(URLContext *h, const char *uri, int flags)
static int crypto_open2(URLContext *h, const char *uri, int flags, AVDictionary **options)
{ {
const char *nested_url; const char *nested_url;
int ret = 0; int ret = 0;
@@ -83,7 +83,7 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
goto err; goto err;
} }
if ((ret = ffurl_open(&c->hd, nested_url, AVIO_FLAG_READ, if ((ret = ffurl_open(&c->hd, nested_url, AVIO_FLAG_READ,
&h->interrupt_callback, NULL)) < 0) {
&h->interrupt_callback, options)) < 0) {
av_log(h, AV_LOG_ERROR, "Unable to open input\n"); av_log(h, AV_LOG_ERROR, "Unable to open input\n");
goto err; goto err;
} }
@@ -161,7 +161,7 @@ static int crypto_close(URLContext *h)


URLProtocol ff_crypto_protocol = { URLProtocol ff_crypto_protocol = {
.name = "crypto", .name = "crypto",
.url_open = crypto_open,
.url_open2 = crypto_open2,
.url_read = crypto_read, .url_read = crypto_read,
.url_close = crypto_close, .url_close = crypto_close,
.priv_data_size = sizeof(CryptoContext), .priv_data_size = sizeof(CryptoContext),


Loading…
Cancel
Save