avformat: replace some odd 30-60 rates by higher less odd ones in get_std_framerate()

Fixes Ticket4012

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-11-21 12:37:59 +01:00
parent f0ae0354d3
commit 367c9d33d6
7 changed files with 15 additions and 9 deletions

View file

@ -2787,10 +2787,16 @@ static void compute_chapters_end(AVFormatContext *s)
static int get_std_framerate(int i)
{
if (i < 60 * 12)
if (i < 30*12)
return (i + 1) * 1001;
else
return ((const int[]) { 24, 30, 60, 12, 15, 48 })[i - 60 * 12] * 1000 * 12;
i -= 30*12;
if (i < 7)
return ((const int[]) { 40, 48, 50, 60, 80, 120, 240})[i] * 1001 * 12;
i -= 7;
return ((const int[]) { 24, 30, 60, 12, 15, 48 })[i] * 1000 * 12;
}
/* Is the time base unreliable?