]> git.sesse.net Git - ffmpeg/commitdiff
av_memcpy_backptr: Drop no longer necessary malloc padding
authorDiego Biurrun <diego@biurrun.de>
Tue, 23 Oct 2012 17:22:52 +0000 (19:22 +0200)
committerMans Rullgard <mans@mansr.com>
Tue, 23 Oct 2012 17:57:24 +0000 (18:57 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/dfa.c
libavcodec/eatgv.c
libavcodec/lcldec.c

index 39f0f6465d4d0e264578f014b89190deb67ed137..46051e041d7bc15df3a4e17137e92b54edc30bde 100644 (file)
@@ -43,7 +43,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx)
     if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
         return ret;
 
-    s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING);
+    s->frame_buf = av_mallocz(avctx->width * avctx->height);
     if (!s->frame_buf)
         return AVERROR(ENOMEM);
 
index b29c99418c67729ed365389ff71271601d0f39b5..404238b6ef34ce9d37ceef463e270f5dfe810833 100644 (file)
@@ -294,8 +294,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
         s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
         s->frame.linesize[0] = s->width;
 
-        /* allocate additional 12 bytes to accommodate av_memcpy_backptr() OUTBUF_PADDED optimisation */
-        s->frame.data[0] = av_malloc(s->width*s->height + 12);
+        s->frame.data[0] = av_malloc(s->width * s->height);
         if (!s->frame.data[0])
             return AVERROR(ENOMEM);
         s->frame.data[1] = av_malloc(AVPALETTE_SIZE);
index 0de7410355cf5eb5058143e40d0caa570befa996..6b101ae6d1b69c4c454012c1480753c486821a74 100644 (file)
@@ -476,7 +476,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
 {
     LclDecContext * const c = avctx->priv_data;
     unsigned int basesize = avctx->width * avctx->height;
-    unsigned int max_basesize = FFALIGN(avctx->width, 4) * FFALIGN(avctx->height, 4) + AV_LZO_OUTPUT_PADDING;
+    unsigned int max_basesize = FFALIGN(avctx->width,  4) *
+                                FFALIGN(avctx->height, 4);
     unsigned int max_decomp_size;
 
     if (avctx->extradata_size < 8) {