summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-04 00:51:44 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-04 01:33:49 +0200
commitb02493e47668e66757b72a7163476e590edfea3a (patch)
treea70970bd5f8e09e1816f81cbd15248ca82e19f1a /libavformat/movenc.c
parent5e6439a12508f8f7f30aeef64eb96c2311b7f573 (diff)
movenc: force video timebase to be 0.1ms precisse at least.
The timebases before where only guranteed to be 1/fps precisse and could cause AV sync errors on low fps Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 6de5306c0b..1a618498e6 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3522,6 +3522,8 @@ static int mov_write_header(AVFormatContext *s)
track->height = track->tag>>24 == 'n' ? 486 : 576;
}
track->timescale = st->codec->time_base.den;
+ while(track->timescale < 10000)
+ track->timescale *= 2;
if (track->mode == MODE_MOV && track->timescale > 100000)
av_log(s, AV_LOG_WARNING,
"WARNING codec timebase is very high. If duration is too long,\n"