diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-07-11 12:56:52 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:14:43 +0200 |
commit | bd2f8560aad6cac0906e37dab1b0df5b694ae5da (patch) | |
tree | 81255ee3f506af58692cb7feee84e8efc2f9c186 /spudec.c | |
parent | 8c00770615fccd0f551c568421700c5df397ef23 (diff) | |
download | mpv-bd2f8560aad6cac0906e37dab1b0df5b694ae5da.tar.bz2 mpv-bd2f8560aad6cac0906e37dab1b0df5b694ae5da.tar.xz |
spudec: Reuse spudec_draw for the unscaled case
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31703 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'spudec.c')
-rw-r--r-- | spudec.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -673,12 +673,12 @@ 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)) +void spudec_draw(void *this, void (*draw_alpha)(void *ctx, int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride), void *ctx) { spudec_handle_t *spu = this; if (spudec_visible(spu)) { - draw_alpha(spu->start_col, spu->start_row, spu->width, spu->height, + draw_alpha(ctx, spu->start_col, spu->start_row, spu->width, spu->height, spu->image, spu->aimage, spu->stride); spu->spu_changed = 0; } @@ -834,12 +834,7 @@ void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*dra if (!(spu_aamode&16) && (spu->orig_frame_width == 0 || spu->orig_frame_height == 0 || (spu->orig_frame_width == dxs && spu->orig_frame_height == dys))) { - if (spu->image) - { - draw_alpha(ctx, spu->start_col, spu->start_row, spu->width, spu->height, - spu->image, spu->aimage, spu->stride); - spu->spu_changed = 0; - } + spudec_draw(spu, draw_alpha, ctx); } else { if (spu->scaled_frame_width != dxs || spu->scaled_frame_height != dys) { /* Resizing is needed */ |