diff options
author | Michael Niedermayer <[email protected]> | 2014-11-21 12:37:59 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2014-11-30 23:35:37 +0100 |
commit | 06336ce760257ae2dbe350cd568a3eb45f48147f (patch) | |
tree | a17107309641de4d307e1b8d671c1faa1ef69aaf /libavformat/utils.c | |
parent | 6f580e87350c817ac3176a9e75d158bf3faad4e3 (diff) |
avformat: replace some odd 30-60 rates by higher less odd ones in get_std_framerate()
Fixes Ticket4012
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 367c9d33d6dd1e8a85b63e14464e7e08ee1315cc)
Conflicts:
libavformat/version.h
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index e899e4d071..d9ffaed0b9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2743,10 +2743,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? |