From 1882a37adb50774089d5d508ef9910d4b2a30db4 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 10 Jul 2010 11:22:42 +0000 Subject: [PATCH] spudec.c: simplify Reuse spudec_visible to avoid code duplication. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31661 b3059339-0415-0410-9bf9-f77b7e298cf2 --- spudec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spudec.c b/spudec.c index af1e9a37d6..7589c2ccda 100644 --- a/spudec.c +++ b/spudec.c @@ -656,7 +656,7 @@ void spudec_set_forced_subs_only(void * const this, const unsigned int flag) 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, unsigned int dxs, unsigned int dys, void (*dra 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) ){ -- 2.11.4.GIT