summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorCalcium <calcium@nurs.or.jp>2005-02-27 01:46:24 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-02-27 01:46:24 +0000
commitda723fd2ddfa549197e5178cd95e48861c01615b (patch)
tree327a20c6421aca037f5ca51264772dba7e3de04f /ffmpeg.c
parent13dfd2b919aa70c2e2fa17440bc84c788aa752e6 (diff)
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
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 6728ab7fc7..46687f4be0 100644
--- a/ffmpeg.c
+++ b/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));
}
}
}