Commit 1d54f510 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mux: simplify ff_choose_timebase()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 75511c29
......@@ -107,11 +107,8 @@ AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precisio
AVRational q;
int j;
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
q = (AVRational){1, st->codec->sample_rate};
} else {
q = st->codec->time_base;
}
q = st->time_base;
for (j=2; j<14; j+= 1+(j>2))
while (q.den / q.num < min_precision && q.num % j == 0)
q.num /= j;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment