X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg.c;h=2a885356b610e536a4657343c109082c39ee50ad;hb=a7f35afb56d3ce5c98effb4340bc6d3ff8662223;hp=b1052c012e6904468a01cff1257f29786f13faf8;hpb=e1459f4b0bb2482c40b458183f78feadb8fe417b;p=ffmpeg diff --git a/ffmpeg.c b/ffmpeg.c index b1052c012e6..2a885356b61 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -40,7 +40,6 @@ #endif #include "libavformat/avformat.h" #include "libavdevice/avdevice.h" -#include "libswscale/swscale.h" #include "libswresample/swresample.h" #include "libavutil/opt.h" #include "libavutil/channel_layout.h" @@ -819,8 +818,12 @@ static void do_video_out(AVFormatContext *s, nb_frames = 1; format_video_sync = video_sync_method; - if (format_video_sync == VSYNC_AUTO) - format_video_sync = (s->oformat->flags & AVFMT_VARIABLE_FPS) ? ((s->oformat->flags & AVFMT_NOTIMESTAMPS) ? VSYNC_PASSTHROUGH : VSYNC_VFR) : VSYNC_CFR; + if (format_video_sync == VSYNC_AUTO) { + if(!strcmp(s->oformat->name, "avi")) { + format_video_sync = VSYNC_VFR; + } else + format_video_sync = (s->oformat->flags & AVFMT_VARIABLE_FPS) ? ((s->oformat->flags & AVFMT_NOTIMESTAMPS) ? VSYNC_PASSTHROUGH : VSYNC_VFR) : VSYNC_CFR; + } switch (format_video_sync) { case VSYNC_CFR: