[FFmpeg-cvslog] apedec: Fix alignment and fate.

Michael Niedermayer git at videolan.org
Thu Feb 2 05:38:54 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Feb  2 04:34:28 2012 +0100| [6462d28dccb42f4aef4ffcbb1deeeceaad4b8002] | committer: Michael Niedermayer

apedec: Fix alignment and fate.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6462d28dccb42f4aef4ffcbb1deeeceaad4b8002
---

 libavcodec/apedec.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 73fa030..6be0d64 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;



More information about the ffmpeg-cvslog mailing list