summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2006-03-09 15:27:22 +0000
committerLuca Abeni <lucabe72@email.it>2006-03-09 15:27:22 +0000
commit4c4a4e9afefc98699f0c720f363e1ce66d8a745d (patch)
tree984be278b0ed284bea71bedb31fb7d5535970767 /ffmpeg.c
parentbbdd41f57fee3376588a80ae341a5c8a4d44dbfe (diff)
Fix crop & pad + rescaling
Originally committed as revision 5133 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 84d0d5eb2d..22a6b9dbf8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1729,8 +1729,8 @@ static int av_encode(AVFormatContext **output_files,
} else if ((codec->width == icodec->width -
(frame_leftBand + frame_rightBand)) &&
(codec->height == icodec->height -
- (frame_topBand + frame_bottomBand)))
- {
+ (frame_topBand + frame_bottomBand)) &&
+ (frame_rightBand + frame_leftBand + frame_topBand + frame_bottomBand)) {
ost->video_resample = 0;
ost->video_crop = 1;
ost->topBand = frame_topBand;
@@ -1738,7 +1738,8 @@ static int av_encode(AVFormatContext **output_files,
} else if ((codec->width == icodec->width +
(frame_padleft + frame_padright)) &&
(codec->height == icodec->height +
- (frame_padtop + frame_padbottom))) {
+ (frame_padtop + frame_padbottom)) &&
+ (frame_padright + frame_padleft + frame_padtop + frame_padbottom)) {
ost->video_resample = 0;
ost->video_crop = 0;
ost->video_pad = 1;