From 1ad542f11f4717a9dee19d46f4da5ce3f6beb449 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Tue, 12 Mar 2013 11:33:43 +0100
Subject: [PATCH] get_video_buffer: add vertical padding

Fix memory corruption

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavutil/frame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 95d018932bf..ea09bc168af 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -106,7 +106,7 @@ static int get_video_buffer(AVFrame *frame, int align)
     }
 
     for (i = 0; i < 4 && frame->linesize[i]; i++) {
-        int h = frame->height;
+        int h = FFALIGN(frame->height, 32);
         if (i == 1 || i == 2)
             h = -((-h) >> desc->log2_chroma_h);
 
-- 
GitLab