diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-07-10 11:22:42 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:14:43 +0200 |
commit | 1882a37adb50774089d5d508ef9910d4b2a30db4 (patch) | |
tree | 1bd5f6feac1a0ba3ddae48d34f77944ff67579b9 /spudec.c | |
parent | 4a9c879ca7b72083b2049345500c41710b58e9c8 (diff) | |
download | mpv-1882a37adb50774089d5d508ef9910d4b2a30db4.tar.bz2 mpv-1882a37adb50774089d5d508ef9910d4b2a30db4.tar.xz |
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
Diffstat (limited to 'spudec.c')
-rw-r--r-- | spudec.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) ){ |