[FFmpeg-cvslog] avcodec/utils: Fix encoder allocation size

Michael Niedermayer git at videolan.org
Wed Jun 12 01:54:35 CEST 2013


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Tue Jun 11 00:33:27 2013 +0200| [376a9f8e6e362178c4e9d95c7d18e1775c014eb6] | committer: Carl Eugen Hoyos

avcodec/utils: Fix encoder allocation size

Fixes Ticket2645
Found-by: Darrell Walisser
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 175e916fa20b7887bdb29809817985e481ae0888)

Conflicts:
	libavcodec/utils.c

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

 libavcodec/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8a4aaf4..2fd61e6 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -474,7 +474,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
 
             buf->linesize[i] = picture.linesize[i];
 
-            buf->base[i] = av_malloc(size[i] + 16); //FIXME 16
+            buf->base[i] = av_malloc(size[i] + 16 + STRIDE_ALIGN - 1); //FIXME 16
             if (buf->base[i] == NULL)
                 return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list