Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r--libavformat/nutenc.c6
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);