mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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
This commit is contained in:
parent
13dfd2b919
commit
da723fd2dd
8
ffmpeg.c
8
ffmpeg.c
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user