apedec: use FFALIGN macro for internal data buffer size
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 11 Oct 2011 18:35:33 +0000 (14:35 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Fri, 28 Oct 2011 15:47:28 +0000 (11:47 -0400)
libavcodec/apedec.c

index 133eb2d..8b1af80 100644 (file)
@@ -843,7 +843,7 @@ static int ape_decode_frame(AVCodecContext *avctx,
             return AVERROR_INVALIDDATA;
         }
 
-        tmp_data = av_realloc(s->data, (buf_size + 3) & ~3);
+        tmp_data = av_realloc(s->data, FFALIGN(buf_size, 4));
         if (!tmp_data)
             return AVERROR(ENOMEM);
         s->data = tmp_data;