diff libvo/vo_mpegpes.c @ 1986:b1d663f54725

Y clipping fixed
author arpi
date Thu, 27 Sep 2001 14:21:56 +0000
parents 24c248fbdb0f
children 2b14cad013b7
line wrap: on
line diff
--- a/libvo/vo_mpegpes.c	Thu Sep 27 13:21:55 2001 +0000
+++ b/libvo/vo_mpegpes.c	Thu Sep 27 14:21:56 2001 +0000
@@ -158,7 +158,7 @@
     codec_context.frame_rate=25*FRAME_RATE_BASE; // !!!!!
     codec_context.gop_size=0; // I frames only
     codec_context.flags=CODEC_FLAG_QSCALE;
-    codec_context.quality=2; // quality!  1..31  (1=best,slowest)
+    codec_context.quality=1; // quality!  1..31  (1=best,slowest)
 
 #if 0
     codec_context.width=width;
@@ -352,7 +352,8 @@
     
     x0+=d_pos_x;
     y0+=d_pos_y;
-    if(w>picture.linesize[0]) w=picture.linesize[0]; // !!
+    if(x0+w>picture.linesize[0]) w=picture.linesize[0]-x0; // !!
+    if(y0+h>codec_context.height) h=codec_context.height-y0;
 
     // Y
     s=srcimg[0]+s_pos_x+s_pos_y*stride[0];