From 8abcbf2d54130d9be896c9b41ca021ce5710a56a Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sat, 3 Jul 2010 10:12:22 +0000 Subject: Reduce codec time base when stream copying Originally committed as revision 24019 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ffmpeg.c') 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) { -- cgit v1.2.3