Browse Source

avformat: Add integer fps from 31 to 60 to get_std_framerate()

Fixes Ticket 5106

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2039b3e751)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.4.13
Michael Niedermayer 10 years ago
parent
commit
dd28571530
2 changed files with 8 additions and 4 deletions
  1. +1
    -1
      libavformat/avformat.h
  2. +7
    -3
      libavformat/utils.c

+ 1
- 1
libavformat/avformat.h View File

@@ -916,7 +916,7 @@ typedef struct AVStream {
/**
* Stream information used internally by av_find_stream_info()
*/
#define MAX_STD_TIMEBASES (30*12+7+6)
#define MAX_STD_TIMEBASES (30*12+30+3+6)
struct {
int64_t last_dts;
int64_t duration_gcd;


+ 7
- 3
libavformat/utils.c View File

@@ -2758,10 +2758,14 @@ static int get_std_framerate(int i)
return (i + 1) * 1001;
i -= 30*12;

if (i < 7)
return ((const int[]) { 40, 48, 50, 60, 80, 120, 240})[i] * 1001 * 12;
if (i < 30)
return (i + 31) * 1001 * 12;
i -= 30;

i -= 7;
if (i < 3)
return ((const int[]) { 80, 120, 240})[i] * 1001 * 12;

i -= 3;

return ((const int[]) { 24, 30, 60, 12, 15, 48 })[i] * 1000 * 12;
}


Loading…
Cancel
Save