[FFmpeg-cvslog] get_video_buffer: add vertical padding

Michael Niedermayer git at videolan.org
Tue Mar 12 11:45:33 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 12 11:33:43 2013 +0100| [1ad542f11f4717a9dee19d46f4da5ce3f6beb449] | committer: Michael Niedermayer

get_video_buffer: add vertical padding

Fix memory corruption

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavutil/frame.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 95d0189..ea09bc1 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);
 



More information about the ffmpeg-cvslog mailing list