avcodec/utils: Fix encoder allocation size
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Jun 2013 22:33:27 +0000 (00:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Jun 2013 23:15:39 +0000 (01:15 +0200)
Fixes Ticket2645
Found-by: Darrell Walisser
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c

index 01e3fbd..15ef713 100644 (file)
@@ -423,7 +423,7 @@ static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame)
             av_buffer_pool_uninit(&pool->pools[i]);
             pool->linesize[i] = picture.linesize[i];
             if (size[i]) {
-                pool->pools[i] = av_buffer_pool_init(size[i] + 16,
+                pool->pools[i] = av_buffer_pool_init(size[i] + 16 + STRIDE_ALIGN - 1,
                                                      CONFIG_MEMORY_POISONING ?
                                                         NULL :
                                                         av_buffer_allocz);