diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-03 21:34:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-03 21:34:43 +0200 |
commit | de707bc8bdfff92a1905169ba6054034d464dbb5 (patch) | |
tree | 4115aae2f3c5172d91d752c157e2a76be43c345c /libavformat/nutenc.c | |
parent | 05e5a24f79fedc36a1addf8a8ed36e9ad5c42d8c (diff) | |
download | ffmpeg-de707bc8bdfff92a1905169ba6054034d464dbb5.tar.gz |
mux/nut: factorize ff_choose_timebase() out of nut
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r-- | libavformat/nutenc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 1402634442..ccd6cb1800 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -676,11 +676,7 @@ static int nut_write_header(AVFormatContext *s){ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->codec->sample_rate) { time_base = (AVRational){1, st->codec->sample_rate}; } else { - for (j=2; j<2000; j+= 1+(j>2)) - while (time_base.den / time_base.num < 48000 && time_base.num % j == 0) - time_base.num /= j; - while (time_base.den / time_base.num < 48000 && time_base.den < (1<<24)) - time_base.den <<= 1; + time_base = ff_choose_timebase(s, st, 48000); } avpriv_set_pts_info(st, 64, time_base.num, time_base.den); |