]> git.sesse.net Git - ffmpeg/commitdiff
Fix cropping & padding when capturing from a v4l(2) card
authorLuca Abeni <lucabe72@email.it>
Tue, 16 May 2006 13:43:06 +0000 (13:43 +0000)
committerLuca Abeni <lucabe72@email.it>
Tue, 16 May 2006 13:43:06 +0000 (13:43 +0000)
Originally committed as revision 5385 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index d03a538484e393e0ddd5e10dd93eb2e383bc2b6e..0a1011453385d3c7337285a88519b310da3d787b 100644 (file)
--- 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;