summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-10-11 15:10:45 +0300
committerMartin Storsjö <martin@martin.st>2012-10-11 23:35:28 +0300
commite002e3291e6dc7953f843abf56fc14f08f238b21 (patch)
tree0792966d2a823bd1dfdca5b3ee078ca794ec1df8
parent9a92aea27bad2f5603ca85e0d0716c679a6b686c (diff)
Use the new aes/md5/sha/tree allocation functions
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavcodec/flacenc.c2
-rw-r--r--libavformat/crypto.c2
-rw-r--r--libavformat/httpauth.c2
-rw-r--r--libavformat/mxfdec.c2
-rw-r--r--libavformat/nut.c2
-rw-r--r--libavformat/rtmpproto.c2
-rw-r--r--libavutil/tree.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 122d485631..b135e4a4e5 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -354,7 +354,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
s->channels, 16);
/* initialize MD5 context */
- s->md5ctx = av_malloc(av_md5_size);
+ s->md5ctx = av_md5_alloc();
if (!s->md5ctx)
return AVERROR(ENOMEM);
av_md5_init(s->md5ctx);
diff --git a/libavformat/crypto.c b/libavformat/crypto.c
index 93c9f23f68..3bc33f2bb9 100644
--- a/libavformat/crypto.c
+++ b/libavformat/crypto.c
@@ -87,7 +87,7 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
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;
diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c
index 4ec8ac2599..774ee2134f 100644
--- a/libavformat/httpauth.c
+++ b/libavformat/httpauth.c
@@ -159,7 +159,7 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username,
ff_data_to_hex(cnonce, (const uint8_t*) cnonce_buf, sizeof(cnonce_buf), 1);
cnonce[2*sizeof(cnonce_buf)] = 0;
- md5ctx = av_malloc(av_md5_size);
+ md5ctx = av_md5_alloc();
if (!md5ctx)
return NULL;
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 25d18f4829..8595d72083 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -340,7 +340,7 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv
int index;
if (!mxf->aesc && s->key && s->keylen == 16) {
- mxf->aesc = av_malloc(av_aes_size);
+ mxf->aesc = av_aes_alloc();
if (!mxf->aesc)
return AVERROR(ENOMEM);
av_aes_init(mxf->aesc, s->key, 128, 1);
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 4e46b984b4..6a68e28173 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -116,7 +116,7 @@ int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b){
void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts){
Syncpoint *sp= av_mallocz(sizeof(Syncpoint));
- struct AVTreeNode *node= av_mallocz(av_tree_node_size);
+ struct AVTreeNode *node = av_tree_node_alloc();
sp->pos= pos;
sp->back_ptr= back_ptr;
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index d04f3a70a4..a5bc246e31 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -859,7 +859,7 @@ int ff_rtmp_calc_digest(const uint8_t *src, int len, int gap,
uint8_t hmac_buf[64+32] = {0};
int i;
- sha = av_mallocz(av_sha_size);
+ sha = av_sha_alloc();
if (!sha)
return AVERROR(ENOMEM);
diff --git a/libavutil/tree.c b/libavutil/tree.c
index 55dcbc59a7..fd51a74916 100644
--- a/libavutil/tree.c
+++ b/libavutil/tree.c
@@ -220,7 +220,7 @@ int main (void)
}
av_log(NULL, AV_LOG_ERROR, "inserting %4d\n", j);
if (!node)
- node = av_mallocz(av_tree_node_size);
+ node = av_tree_node_alloc();
av_tree_insert(&root, (void *) (j + 1), cmp, &node);
j = av_lfg_get(&prng) % 86294;