summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-03 21:38:56 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-03 21:38:56 +0200
commit5e6439a12508f8f7f30aeef64eb96c2311b7f573 (patch)
tree6be05bbda00ec09ac26730bdddda245e591bbdd6 /libavformat
parentde707bc8bdfff92a1905169ba6054034d464dbb5 (diff)
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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index cd5481f1d2..48f4d77d5f 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -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))