[MPlayer-cvslog] r31661 - trunk/spudec.c

reimar subversion at mplayerhq.hu
Sat Jul 10 13:22:42 CEST 2010


Author: reimar
Date: Sat Jul 10 13:22:42 2010
New Revision: 31661

Log:
Reuse spudec_visible to avoid code duplication.

Modified:
   trunk/spudec.c

Modified: trunk/spudec.c
==============================================================================
--- trunk/spudec.c	Sat Jul 10 12:23:40 2010	(r31660)
+++ trunk/spudec.c	Sat Jul 10 13:22:42 2010	(r31661)
@@ -656,7 +656,7 @@ void spudec_set_forced_subs_only(void * 
 void spudec_draw(void *this, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride))
 {
     spudec_handle_t *spu = (spudec_handle_t *)this;
-    if (spu->start_pts <= spu->now_pts && spu->now_pts < spu->end_pts && spu->image)
+    if (spudec_visible(spu))
     {
 	draw_alpha(spu->start_col, spu->start_row, spu->width, spu->height,
 		   spu->image, spu->aimage, spu->stride);
@@ -807,7 +807,7 @@ void spudec_draw_scaled(void *me, unsign
   scale_pixel *table_x;
   scale_pixel *table_y;
 
-  if (spu->start_pts <= spu->now_pts && spu->now_pts < spu->end_pts) {
+  if (spudec_visible(spu)) {
 
     // check if only forced subtitles are requested
     if( (spu->forced_subs_only) && !(spu->is_forced_sub) ){


More information about the MPlayer-cvslog mailing list