1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

Fix avfilter_draw_slice() copy code with alpha planes.

Originally committed as revision 26060 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2010-12-19 19:08:30 +00:00
parent 2609ad3e40
commit fee0deb61f

View File

@ -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];