Commit 5e6439a1 authored by Michael Niedermayer's avatar Michael Niedermayer

ff_choose_timebase: only try factors upto 14

otherwise a unexpected timebase could be choosen
that is one that is thousand times more precisse than requested
which can have sideeffects.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent de707bc8
......@@ -113,7 +113,7 @@ AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precissi
} else {
q = st->codec->time_base;
}
for (j=2; j<2000; j+= 1+(j>2))
for (j=2; j<14; j+= 1+(j>2))
while (q.den / q.num < min_precission && q.num % j == 0)
q.num /= j;
while (q.den / q.num < min_precission && q.den < (1<<24))
......
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