aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/apedec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-02 04:34:28 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-02 04:34:28 +0100
commit6462d28dccb42f4aef4ffcbb1deeeceaad4b8002 (patch)
tree861a5cf561aeaf8a9b72ecef23d8345f09f444f4 /libavcodec/apedec.c
parent4c677df27cc62e5dd8df9da9d0ca9fb7d963bc08 (diff)
downloadffmpeg-6462d28dccb42f4aef4ffcbb1deeeceaad4b8002.tar.gz
apedec: Fix alignment and fate.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/apedec.c')
-rw-r--r--libavcodec/apedec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 73fa030e6e..6be0d64d0a 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -838,10 +838,10 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- tmp_data = av_realloc(s->data, FFALIGN(buf_size, 4));
- if (!tmp_data)
+ av_free(s->data);
+ s->data = av_malloc(FFALIGN(buf_size, 4));
+ if (!s->data)
return AVERROR(ENOMEM);
- s->data = tmp_data;
s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
s->ptr = s->data;
s->data_end = s->data + buf_size;