aboutsummaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorBaptiste Coudurier2010-07-03 10:12:22 +0000
committerBaptiste Coudurier2010-07-03 10:12:22 +0000
commit8abcbf2d54130d9be896c9b41ca021ce5710a56a (patch)
tree3d1f7374d07fe643fd4120095ce154297c6f0832 /ffmpeg.c
parent3483d87752098cbd4ee11741847fd394db46f331 (diff)
Reduce codec time base when stream copying
Originally committed as revision 24019 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index a286b0bb11..e5d8b260a9 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2173,6 +2173,8 @@ static int av_transcode(AVFormatContext **output_files,
if(av_q2d(icodec->time_base)*icodec->ticks_per_frame > av_q2d(ist->st->time_base) && av_q2d(ist->st->time_base) < 1.0/1000){
codec->time_base = icodec->time_base;
codec->time_base.num *= icodec->ticks_per_frame;
+ av_reduce(&codec->time_base.num, &codec->time_base.den,
+ codec->time_base.num, codec->time_base.den, INT_MAX);
}else
codec->time_base = ist->st->time_base;
switch(codec->codec_type) {