[MPlayer-cvslog] r28876 - trunk/libass/ass_render.c

greg subversion at mplayerhq.hu
Sun Mar 8 05:03:28 CET 2009


Author: greg
Date: Sun Mar  8 05:03:28 2009
New Revision: 28876

Log:
Fix clipping for pan-and-scan.

Modified:
   trunk/libass/ass_render.c

Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	Sun Mar  8 05:03:24 2009	(r28875)
+++ trunk/libass/ass_render.c	Sun Mar  8 05:03:28 2009	(r28876)
@@ -2108,11 +2108,11 @@ static int ass_render_event(ass_event_t*
 	}
 	
 	// fix clip coordinates (they depend on alignment)
-	render_context.clip_x0 = x2scr(render_context.clip_x0);
-	render_context.clip_x1 = x2scr(render_context.clip_x1);
 	if (render_context.evt_type == EVENT_NORMAL ||
 	    render_context.evt_type == EVENT_HSCROLL ||
 	    render_context.evt_type == EVENT_VSCROLL) {
+		render_context.clip_x0 = x2scr(render_context.clip_x0);
+		render_context.clip_x1 = x2scr(render_context.clip_x1);
 		if (valign == VALIGN_TOP) {
 			render_context.clip_y0 = y2scr_top(render_context.clip_y0);
 			render_context.clip_y1 = y2scr_top(render_context.clip_y1);
@@ -2124,8 +2124,10 @@ static int ass_render_event(ass_event_t*
 			render_context.clip_y1 = y2scr_sub(render_context.clip_y1);
 		}
 	} else if (render_context.evt_type == EVENT_POSITIONED) {
-		render_context.clip_y0 = y2scr(render_context.clip_y0);
-		render_context.clip_y1 = y2scr(render_context.clip_y1);
+		render_context.clip_x0 = x2scr_pos(render_context.clip_x0);
+		render_context.clip_x1 = x2scr_pos(render_context.clip_x1);
+		render_context.clip_y0 = y2scr_pos(render_context.clip_y0);
+		render_context.clip_y1 = y2scr_pos(render_context.clip_y1);
 	}
 
 	// calculate rotation parameters



More information about the MPlayer-cvslog mailing list