diff options
author | Calcium <calcium@nurs.or.jp> | 2005-02-27 01:46:24 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-02-27 01:46:24 +0000 |
commit | da723fd2ddfa549197e5178cd95e48861c01615b (patch) | |
tree | 327a20c6421aca037f5ca51264772dba7e3de04f | |
parent | 13dfd2b919aa70c2e2fa17440bc84c788aa752e6 (diff) | |
download | ffmpeg-da723fd2ddfa549197e5178cd95e48861c01615b.tar.gz |
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
-rw-r--r-- | ffmpeg.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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)); } } } |