Commit da723fd2 authored by Calcium's avatar Calcium Committed by 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
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment