aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-09 00:03:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-09 00:09:32 +0100
commit9c52ab6f4f32466a2c263d393e73548d1f0f47c1 (patch)
tree1dd778dac0c193adc80449d0f8ff42092afce241
parentac4447b6ec4e2dd1dc9d0432241cf5a63c3b54e6 (diff)
downloadffmpeg-9c52ab6f4f32466a2c263d393e73548d1f0f47c1.tar.gz
ffmpeg: treat avi as VFR in framerate conversion code
It can be debated if avi is vfr or cfr, it can be either depending on the definition of vfr and cfr. This commit ensures that avi is treated correctly independent of the AVFMT_VARIABLE_FPS value. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index b1052c012e..a628fe637d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -819,8 +819,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: