]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg.c
fabs is better then abs for floats ...
[ffmpeg] / ffmpeg.c
index d03a538484e393e0ddd5e10dd93eb2e383bc2b6e..348bab084df126f005332383e96c9bb467c5f49a 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2402,9 +2402,9 @@ static void opt_pre_me(const char *arg)
 static void opt_qscale(const char *arg)
 {
     video_qscale = atof(arg);
-    if (video_qscale < 0.01 ||
+    if (video_qscale <= 0 ||
         video_qscale > 255) {
-        fprintf(stderr, "qscale must be >= 0.01 and <= 255\n");
+        fprintf(stderr, "qscale must be > 0.0 and <= 255\n");
         exit(1);
     }
 }
@@ -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;