summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2006-05-16 13:43:06 +0000
committerLuca Abeni <lucabe72@email.it>2006-05-16 13:43:06 +0000
commitb997b34fa7a52120acd6738258c7049e54f10821 (patch)
tree65f0d62f330de5b8c3e125848f2d07909ff98b30 /ffmpeg.c
parente89b8b0a9370346e3c9ab5c2a8aa2c674933305d (diff)
Fix cropping & padding when capturing from a v4l(2) card
Originally committed as revision 5385 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index d03a538484..0a10114533 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3463,6 +3463,10 @@ static void prepare_grab(void)
if (vp->time_base.num*(int64_t)enc->time_base.den > enc->time_base.num*(int64_t)vp->time_base.den){
vp->time_base = enc->time_base;
+ vp->width += frame_leftBand + frame_rightBand;
+ vp->width -= (frame_padleft + frame_padright);
+ vp->height += frame_topBand + frame_bottomBand;
+ vp->height -= (frame_padtop + frame_padbottom);
}
has_video = 1;
break;