summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-05-02 00:46:03 +0300
committerUoti Urpala <uau@mplayer2.org>2011-05-02 00:46:03 +0300
commit7e65428712beacd416dc3410c52f22ebfd3b4c53 (patch)
tree79bb2f4388be7031b5505c7745e1a59aff6cff56 /sub
parent5c4b059f1608f6d6a981b7d81a14f1c46e40ba52 (diff)
parentd0376729d171a6c0b4cc15928c168f68adefbaa6 (diff)
downloadmpv-7e65428712beacd416dc3410c52f22ebfd3b4c53.tar.bz2
mpv-7e65428712beacd416dc3410c52f22ebfd3b4c53.tar.xz
Merge branch 'mplayer1_changes'
Diffstat (limited to 'sub')
-rw-r--r--sub/spudec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sub/spudec.c b/sub/spudec.c
index f48d47fd2a..dbf956bb25 100644
--- a/sub/spudec.c
+++ b/sub/spudec.c
@@ -920,6 +920,10 @@ void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*dra
}
if (spu->scaled_image) {
unsigned int x, y;
+ // needs to be 0-initialized because draw_alpha draws always a
+ // multiple of 8 pixels. TODO: optimize
+ if (spu->scaled_width & 7)
+ memset(spu->scaled_image, 0, 2 * spu->scaled_image_size);
if (spu->scaled_width <= 1 || spu->scaled_height <= 1) {
goto nothing_to_do;
}