mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Fix cropping & padding when capturing from a v4l(2) card
Originally committed as revision 5385 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e89b8b0a93
commit
b997b34fa7
4
ffmpeg.c
4
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){
|
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->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;
|
has_video = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user