]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Fix blend_subrect for even-width subrects positioned on odd columns
authorsuperdump <superdump@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Feb 2009 00:27:04 +0000 (00:27 +0000)
committersuperdump <superdump@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Feb 2009 00:27:04 +0000 (00:27 +0000)
Patch by Björn Axelsson ( gecko A acc D umu D se )

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17088 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

ffplay.c

index 3a22c45a466af5deb9a7356113ff5aa5ea98d1e8..9367f64101b12d6f836cbcbd5561ffa6d3d8668e 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -449,7 +449,7 @@ static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw,
     cb = dst->data[1] + (dsty >> 1) * dst->linesize[1];
     cr = dst->data[2] + (dsty >> 1) * dst->linesize[2];
 
-    width2 = (dstw + 1) >> 1;
+    width2 = ((dstw + 1) >> 1) + (dstx & ~dstw & 1);
     skip2 = dstx >> 1;
     wrap = dst->linesize[0];
     wrap3 = rect->pict.linesize[0];