提交 da723fd2 编写于 作者: C Calcium 提交者: Michael Niedermayer

This patch corrects the bug, that if padbottom IS NOT specified and

padright IS specified
patch by (Calcium <calcium nurs.or jp>)

Originally committed as revision 3987 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 13dfd2b9
......@@ -661,15 +661,15 @@ static void fill_pad_region(AVPicture* img, int height, int width,
optr = img->data[i] + (img->linesize[i] * (padtop >> shift)) +
(img->linesize[i] - (padright >> shift));
for (y = 0; y < ((height - (padtop + padbottom)) >> shift); y++) {
for (y = 0; y < ((height - (padtop + padbottom) - 1) >> shift); y++) {
memset(optr, color[i], (padleft + padright) >> shift);
optr += img->linesize[i];
}
}
if (padbottom) {
optr = img->data[i] + (img->linesize[i] * ((height - padbottom) >> shift));
memset(optr, color[i], ((img->linesize[i] * padbottom) >> shift));
if (padbottom || padright) {
optr = img->data[i] + (((img->linesize[i] * (height - padbottom)) - padright) >> shift);
memset(optr, color[i], (((img->linesize[i] * padbottom) + padright) >> shift));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册