]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/crypto.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / crypto.c
index 93c9f23f682cab7c0c31a9ff83c9d64ee6557575..5d518beb01191508ed91e2841d7bde652a0f3541 100644 (file)
@@ -59,7 +59,7 @@ static const AVClass crypto_class = {
     .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;
     int ret = 0;
@@ -83,11 +83,11 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
         goto err;
     }
     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");
         goto err;
     }
-    c->aes = av_mallocz(av_aes_size);
+    c->aes = av_aes_alloc();
     if (!c->aes) {
         ret = AVERROR(ENOMEM);
         goto err;
@@ -161,7 +161,7 @@ static int crypto_close(URLContext *h)
 
 URLProtocol ff_crypto_protocol = {
     .name            = "crypto",
-    .url_open        = crypto_open,
+    .url_open2       = crypto_open2,
     .url_read        = crypto_read,
     .url_close       = crypto_close,
     .priv_data_size  = sizeof(CryptoContext),