Mercurial > mplayer.hg
changeset 31595:1026cf3f3e7b
Reuse spudec_visible to avoid code duplication.
author | reimar |
---|---|
date | Sat, 10 Jul 2010 11:22:42 +0000 |
parents | 8f8d3775d564 |
children | b4a96ea85a71 |
files | spudec.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) ){