summaryrefslogtreecommitdiffstats
path: root/spudec.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-01-08 21:06:04 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-01-08 21:06:04 +0000
commitaae5663175bf24ff9a8a8ee5b01e46420f3f7357 (patch)
tree54c570fee40a946c35dcc914cb0d311844eb05cb /spudec.c
parent479bdb2c08e8789d580c5c6f5a602499b25438f9 (diff)
downloadmpv-aae5663175bf24ff9a8a8ee5b01e46420f3f7357.tar.bz2
mpv-aae5663175bf24ff9a8a8ee5b01e46420f3f7357.tar.xz
Fix black line on right of subtitle with -spuaa 4 by setting alpha of
border pixels to 0 after scaling, not before. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14433 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'spudec.c')
-rw-r--r--spudec.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/spudec.c b/spudec.c
index f6102f6147..ec907fb805 100644
--- a/spudec.c
+++ b/spudec.c
@@ -808,15 +808,6 @@ void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*dra
}
if (spu->scaled_image) {
unsigned int x, y;
- /* Kludge: draw_alpha needs width multiple of 8. */
- if (spu->scaled_width < spu->scaled_stride)
- for (y = 0; y < spu->scaled_height; ++y) {
- memset(spu->scaled_aimage + y * spu->scaled_stride + spu->scaled_width, 0,
- spu->scaled_stride - spu->scaled_width);
- /* FIXME: Why is this one needed? */
- memset(spu->scaled_image + y * spu->scaled_stride + spu->scaled_width, 0,
- spu->scaled_stride - spu->scaled_width);
- }
if (spu->scaled_width <= 1 || spu->scaled_height <= 1) {
goto nothing_to_do;
}
@@ -1061,6 +1052,12 @@ void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*dra
}
}
nothing_to_do:
+ /* Kludge: draw_alpha needs width multiple of 8. */
+ if (spu->scaled_width < spu->scaled_stride)
+ for (y = 0; y < spu->scaled_height; ++y) {
+ memset(spu->scaled_aimage + y * spu->scaled_stride + spu->scaled_width, 0,
+ spu->scaled_stride - spu->scaled_width);
+ }
spu->scaled_frame_width = dxs;
spu->scaled_frame_height = dys;
}