]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/crypto.c
libmodplug: consistent use of sizeof.
[ffmpeg] / libavformat / crypto.c
index ea6012ad09fc9eff5c542c954a5575f91435f3f2..5e7ee1eba35130e4ad57fa956c8bc01d8b5cef78 100644 (file)
@@ -52,7 +52,10 @@ static const AVOption options[] = {
 };
 
 static const AVClass crypto_class = {
-    "crypto", av_default_item_name, options, LIBAVUTIL_VERSION_INT
+    .class_name     = "crypto",
+    .item_name      = av_default_item_name,
+    .option         = options,
+    .version        = LIBAVUTIL_VERSION_INT,
 };
 
 static int crypto_open(URLContext *h, const char *uri, int flags)
@@ -94,8 +97,8 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
 
     return 0;
 err:
-    av_free(c->key);
-    av_free(c->iv);
+    av_freep(&c->key);
+    av_freep(&c->iv);
     return ret;
 }
 
@@ -153,9 +156,9 @@ static int crypto_close(URLContext *h)
     CryptoContext *c = h->priv_data;
     if (c->hd)
         ffurl_close(c->hd);
-    av_free(c->aes);
-    av_free(c->key);
-    av_free(c->iv);
+    av_freep(&c->aes);
+    av_freep(&c->key);
+    av_freep(&c->iv);
     return 0;
 }