diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-12-19 19:08:30 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-12-19 19:08:30 +0000 |
commit | fee0deb61fa6e306009ad8d32967e6c66a5c3b2e (patch) | |
tree | bd08a000c8e96b6d3c8bb7ffb51390545cc2b30c /libavfilter | |
parent | 2609ad3e401294331910415f90aca943e144629e (diff) | |
download | ffmpeg-fee0deb61fa6e306009ad8d32967e6c66a5c3b2e.tar.gz |
Fix avfilter_draw_slice() copy code with alpha planes.
Originally committed as revision 26060 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfilter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index db254d6550..362d53701f 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -416,9 +416,9 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) for (i = 0; i < 4; i++) { if (link->src_buf->data[i]) { src[i] = link->src_buf-> data[i] + - (y >> (i==0 ? 0 : vsub)) * link->src_buf-> linesize[i]; + (y >> (i==1 || i==2 ? vsub : 0)) * link->src_buf-> linesize[i]; dst[i] = link->cur_buf->data[i] + - (y >> (i==0 ? 0 : vsub)) * link->cur_buf->linesize[i]; + (y >> (i==1 || i==2 ? vsub : 0)) * link->cur_buf->linesize[i]; } else src[i] = dst[i] = NULL; } @@ -429,7 +429,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) if (!src[i]) continue; - for (j = 0; j < h >> (i==0 ? 0 : vsub); j++) { + for (j = 0; j < h >> (i==1 || i==2 ? vsub : 0); j++) { memcpy(dst[i], src[i], planew); src[i] += link->src_buf->linesize[i]; dst[i] += link->cur_buf->linesize[i]; |