[FFmpeg-cvslog] avformat: Add integer fps from 31 to 60 to get_std_framerate()

Michael Niedermayer git at videolan.org
Mon Feb 1 02:35:17 CET 2016


ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Jan  9 10:49:23 2016 +0100| [dd285715308f55051b423f35d14c17baebc4b14b] | committer: Michael Niedermayer

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

Fixes Ticket 5106

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

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd285715308f55051b423f35d14c17baebc4b14b
---

 libavformat/avformat.h |    2 +-
 libavformat/utils.c    |   10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ebf04f6..6d28965 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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;
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f26cfb3..cf4d0d6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list