summaryrefslogtreecommitdiff
path: root/libavutil/sha.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-12 14:52:34 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-12 14:52:34 +0200
commitf391e405dfde35bfb3fea9ccc09bd67b5cc0a8f2 (patch)
tree739e823660aa365a392c509acd1ac1686272029f /libavutil/sha.c
parentd6135a886d85bdbf271c55a238c3336670adc742 (diff)
parente002e3291e6dc7953f843abf56fc14f08f238b21 (diff)
Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'
* commit 'e002e3291e6dc7953f843abf56fc14f08f238b21': Use the new aes/md5/sha/tree allocation functions avutil: Add functions for allocating opaque contexts for algorithms svq3: fix pointer type warning svq3: replace unsafe pointer casting with intreadwrite macros parseutils-test: various cleanups Conflicts: doc/APIchanges libavcodec/svq3.c libavutil/parseutils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/sha.c')
-rw-r--r--libavutil/sha.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/sha.c b/libavutil/sha.c
index c5d13c127a..e3a956a4b5 100644
--- a/libavutil/sha.c
+++ b/libavutil/sha.c
@@ -26,6 +26,7 @@
#include "bswap.h"
#include "sha.h"
#include "intreadwrite.h"
+#include "mem.h"
/** hash context */
typedef struct AVSHA {
@@ -37,7 +38,14 @@ typedef struct AVSHA {
void (*transform)(uint32_t *state, const uint8_t buffer[64]);
} AVSHA;
+#if FF_API_CONTEXT_SIZE
const int av_sha_size = sizeof(AVSHA);
+#endif
+
+struct AVSHA *av_sha_alloc(void)
+{
+ return av_mallocz(sizeof(struct AVSHA));
+}
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))