]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/aes.c
avutil: Add functions for allocating opaque contexts for algorithms
[ffmpeg] / libavutil / aes.c
index 6803c7190d973153dec30e1d363263f2503c8e83..4656a486345a5f4d4e863a8bbcf05a26b7f6f9d0 100644 (file)
@@ -39,7 +39,14 @@ typedef struct AVAES {
     int rounds;
 } AVAES;
 
+#if FF_API_CONTEXT_SIZE
 const int av_aes_size= sizeof(AVAES);
+#endif
+
+struct AVAES *av_aes_alloc(void)
+{
+    return av_mallocz(sizeof(struct AVAES));
+}
 
 static const uint8_t rcon[10] = {
   0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36