From 4ba22e044b42f30482346c2cfd991eaa80c1a62f Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date: Sun, 12 Dec 2010 15:31:49 +0000
Subject: [PATCH] Fix avpicture_alloc(), which was aligning the linesizes with
 0 and thus causing a wrong allocation.

Originally committed as revision 25938 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/imgconvert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 3c143613fde..6b0c049e2a5 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -815,7 +815,7 @@ int avpicture_alloc(AVPicture *picture,
 {
     int ret;
 
-    if ((ret = av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 0)) < 0) {
+    if ((ret = av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 1)) < 0) {
         memset(picture, 0, sizeof(AVPicture));
         return ret;
     }
-- 
GitLab