From bd2f8560aad6cac0906e37dab1b0df5b694ae5da Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 11 Jul 2010 12:56:52 +0000 Subject: spudec: Reuse spudec_draw for the unscaled case git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31703 b3059339-0415-0410-9bf9-f77b7e298cf2 --- spudec.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'spudec.c') diff --git a/spudec.c b/spudec.c index 6ccc1798b1..06172077e1 100644 --- a/spudec.c +++ b/spudec.c @@ -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 */ -- cgit v1.2.3