changeset 1091:03df246fb06b libavcodec

fixing inaccurate frame_rate
author michaelni
date Sat, 01 Mar 2003 00:16:00 +0000
parents 8216533dd959
children f59c3f66363b
files avcodec.h mpeg12data.h
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Fri Feb 28 16:06:40 2003 +0000
+++ b/avcodec.h	Sat Mar 01 00:16:00 2003 +0000
@@ -169,7 +169,7 @@
 #define CODEC_CAP_PARSE_ONLY      0x0004
 #define CODEC_CAP_TRUNCATED       0x0008
 
-#define FRAME_RATE_BASE 10000
+#define FRAME_RATE_BASE 10010
 
 #define FF_COMMON_FRAME \
     uint8_t *data[4];\
--- a/mpeg12data.h	Fri Feb 28 16:06:40 2003 +0000
+++ b/mpeg12data.h	Sat Mar 01 00:16:00 2003 +0000
@@ -386,14 +386,14 @@
 
 static const int frame_rate_tab[9] = {
     0, 
-    (int)(23.976 * FRAME_RATE_BASE), 
-    (int)(24 * FRAME_RATE_BASE), 
-    (int)(25 * FRAME_RATE_BASE), 
-    (int)(29.97 * FRAME_RATE_BASE), 
-    (int)(30 * FRAME_RATE_BASE), 
-    (int)(50 * FRAME_RATE_BASE), 
-    (int)(59.94 * FRAME_RATE_BASE), 
-    (int)(60 * FRAME_RATE_BASE), 
+    24000 * FRAME_RATE_BASE / 1001,
+    24000 * FRAME_RATE_BASE / 1000,
+    25000 * FRAME_RATE_BASE / 1000,
+    30000 * FRAME_RATE_BASE / 1001,
+    30000 * FRAME_RATE_BASE / 1000,
+    50000 * FRAME_RATE_BASE / 1000,
+    60000 * FRAME_RATE_BASE / 1001,
+    60000 * FRAME_RATE_BASE / 1000,
 };
 
 static const uint8_t non_linear_qscale[32] = {