mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
de707bc8bd
commit
5e6439a125
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user