# HG changeset patch # User reimar # Date 1278760962 0 # Node ID 1026cf3f3e7bcbf2017dc68fd161c0effa893baf # Parent 8f8d3775d56496f4e1fb22eb989e8579f8988aec Reuse spudec_visible to avoid code duplication. diff -r 8f8d3775d564 -r 1026cf3f3e7b spudec.c --- a/spudec.c Sat Jul 10 10:23:40 2010 +0000 +++ b/spudec.c Sat Jul 10 11:22:42 2010 +0000 @@ -656,7 +656,7 @@ 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 @@ 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) ){