summaryrefslogtreecommitdiffstats
path: root/spudec.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-04 06:36:36 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:41:04 +0300
commit8716df2a41f6ff05f59577a0433401ea141226f3 (patch)
tree491d1c9e1cf862294283335ade557100c2181baf /spudec.c
parent2bcfe1e077fe043751d3f7c73c82be761629419f (diff)
downloadmpv-8716df2a41f6ff05f59577a0433401ea141226f3.tar.bz2
mpv-8716df2a41f6ff05f59577a0433401ea141226f3.tar.xz
Add context variable to vo_draw_text callback
Add a context variable and rename the function to osd_draw_text. Create a new vo_draw_text that is a wrapper for VOs using old API.
Diffstat (limited to 'spudec.c')
-rw-r--r--spudec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/spudec.c b/spudec.c
index 6e7899b13f..2904908e59 100644
--- a/spudec.c
+++ b/spudec.c
@@ -767,7 +767,7 @@ void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh, int ds,
sws_freeContext(ctx);
}
-void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride))
+void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, 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 = (spudec_handle_t *)me;
scale_pixel *table_x;
@@ -784,7 +784,7 @@ void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*dra
|| (spu->orig_frame_width == dxs && spu->orig_frame_height == dys))) {
if (spu->image)
{
- 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;
}
@@ -1085,7 +1085,7 @@ nothing_to_do:
spu->scaled_start_row = dys*sub_pos/100 - spu->scaled_height;
break;
}
- draw_alpha(spu->scaled_start_col, spu->scaled_start_row, spu->scaled_width, spu->scaled_height,
+ draw_alpha(ctx, spu->scaled_start_col, spu->scaled_start_row, spu->scaled_width, spu->scaled_height,
spu->scaled_image, spu->scaled_aimage, spu->scaled_stride);
spu->spu_changed = 0;
}