[SCM] libav/experimental: Fix avpicture_alloc(), which was aligning the linesizes with 0 and thus causing a wrong allocation.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:20:03 UTC 2013


The following commit has been merged in the experimental branch:
commit 4ba22e044b42f30482346c2cfd991eaa80c1a62f
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date:   Sun Dec 12 15:31:49 2010 +0000

    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

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 3c14361..6b0c049 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;
     }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list