Fixes Ticket4012
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 367c9d33d6dd1e8a85b63e14464e7e08ee1315cc)
Conflicts:
libavformat/version.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -916,7 +916,7 @@ typedef struct AVStream { |
916 | 916 |
/** |
917 | 917 |
* Stream information used internally by av_find_stream_info() |
918 | 918 |
*/ |
919 |
-#define MAX_STD_TIMEBASES (60*12+6) |
|
919 |
+#define MAX_STD_TIMEBASES (30*12+7+6) |
|
920 | 920 |
struct { |
921 | 921 |
int64_t last_dts; |
922 | 922 |
int64_t duration_gcd; |
... | ... |
@@ -2743,10 +2743,16 @@ static void compute_chapters_end(AVFormatContext *s) |
2743 | 2743 |
|
2744 | 2744 |
static int get_std_framerate(int i) |
2745 | 2745 |
{ |
2746 |
- if (i < 60 * 12) |
|
2746 |
+ if (i < 30*12) |
|
2747 | 2747 |
return (i + 1) * 1001; |
2748 |
- else |
|
2749 |
- return ((const int[]) { 24, 30, 60, 12, 15, 48 })[i - 60 * 12] * 1000 * 12; |
|
2748 |
+ i -= 30*12; |
|
2749 |
+ |
|
2750 |
+ if (i < 7) |
|
2751 |
+ return ((const int[]) { 40, 48, 50, 60, 80, 120, 240})[i] * 1001 * 12; |
|
2752 |
+ |
|
2753 |
+ i -= 7; |
|
2754 |
+ |
|
2755 |
+ return ((const int[]) { 24, 30, 60, 12, 15, 48 })[i] * 1000 * 12; |
|
2750 | 2756 |
} |
2751 | 2757 |
|
2752 | 2758 |
/* Is the time base unreliable? |