From 5e6439a12508f8f7f30aeef64eb96c2311b7f573 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Wed, 3 Oct 2012 21:38:56 +0200
Subject: 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>
---
 libavformat/mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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))
-- 
cgit v1.2.3