From d63a7187646c07619ecb07a3d4bb67c7fba5500d Mon Sep 17 00:00:00 2001
From: David Conrad <lessen42@gmail.com>
Date: Tue, 9 Mar 2010 06:52:33 +0000
Subject: [PATCH] vp3: correctly clip vp3_draw_horiz_band call

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

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 9e99ddebdc6..ff56be65fed 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1565,7 +1565,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
       *     dispatch (slice - 1);
       */
 
-    vp3_draw_horiz_band(s, 64*slice + 64-16);
+    vp3_draw_horiz_band(s, FFMIN(64*slice + 64-16, s->height-16));
 }
 
 /*
-- 
GitLab