changeset 15683:978f2346dc43

correcting the previous draw_slice fix - don't draw slices beyond sh->disp_h - draw slices sh->disp_w wide to avoid buffer overflow in VO
author henry
date Tue, 07 Jun 2005 10:04:22 +0000
parents cb3592da6d30
children ed097a23f1ad
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Tue Jun 07 09:19:28 2005 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Tue Jun 07 10:04:22 2005 +0000
@@ -451,11 +451,13 @@
         }
     }else
 #endif
+    if (y < sh->disp_h) {
 #if LIBAVCODEC_BUILD >= 4670
-        mpcodecs_draw_slice (sh, source, src->linesize, width, (y+16)<=sh->disp_h?height:sh->disp_h-y, 0, y);
+        mpcodecs_draw_slice (sh, source, src->linesize, sh->disp_w, (y+16)<=sh->disp_h?height:sh->disp_h-y, 0, y);
 #else
-        mpcodecs_draw_slice (sh,src, stride, width, (y+16)<=sh->disp_h?height:sh->disp_h-y, 0, y);
+        mpcodecs_draw_slice (sh,src, stride, sh->disp_w, (y+16)<=sh->disp_h?height:sh->disp_h-y, 0, y);
 #endif
+    }
 }