]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg.c
Completed documentation of reference field.
[ffmpeg] / ffmpeg.c
index 2b7408692ad3f5e5849f85d27696c785e9d22c3e..79ad1a4263f5cb64008e1fb63ddc69481cd23ebe 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -865,7 +865,7 @@ static void do_video_out(AVFormatContext *s,
         //FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c
         if (vdelta < -1.1)
             nb_frames = 0;
-        else if (video_sync_method == 2)
+        else if (video_sync_method == 2 || (video_sync_method<0 && (s->oformat->flags & AVFMT_VARIABLE_FPS)))
             ost->sync_opts= lrintf(get_sync_ipts(ost) / av_q2d(enc->time_base));
         else if (vdelta > 1.1)
             nb_frames = lrintf(vdelta);
@@ -1897,7 +1897,7 @@ static int av_encode(AVFormatContext **output_files,
         }
         if(codec->codec_type == CODEC_TYPE_VIDEO){
             int size= codec->width * codec->height;
-            bit_buffer_size= FFMAX(bit_buffer_size, 4*size);
+            bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200);
         }
     }