diff options
author | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-10 01:42:06 +0000 |
---|---|---|
committer | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-10 01:42:06 +0000 |
commit | 5c416790ceea3088095eb3a51fdb7ce0364915f1 (patch) | |
tree | ac57f874dd79267755e4f76fe4b62f8ed226afa3 /libmpdemux | |
parent | 1a1943b4021f9121d6688fc77f1648f68f1b4d57 (diff) |
reconcile with earlier fps fix in mpeg header parser
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16193 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/muxer_mpeg.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c index 3d3d690426..d68f6c7c49 100644 --- a/libmpdemux/muxer_mpeg.c +++ b/libmpdemux/muxer_mpeg.c @@ -1849,26 +1849,26 @@ init: } -static uint64_t parse_fps(int fps) +static uint64_t parse_fps(float fps) { // 90000 * 1024 / fps - switch(fps) + switch((int)(fps*1001+0.5)) { - case 239760: + case 24000: return 3843844; - case 240000: + case 24024: return 3840000; - case 250000: + case 25025: return 3686400; - case 299700: + case 30000: return 3075075; - case 300000: + case 30030: return 3072000; - case 500000: + case 50050: return 1843200; - case 599400: + case 60000: return 1537538; - case 600000: + case 60060: return 1536000; default: mp_msg(MSGT_MUXER, MSGL_ERR, "ERROR! unknown fps code: %d", fps); @@ -1891,7 +1891,7 @@ static int soft_telecine(muxer_headers_t *vpriv, uint8_t *fps_ptr, uint8_t *se_p return 0; } *fps_ptr = (*fps_ptr & 0xf0) | (fps + 3); - vpriv->nom_delta_pts = parse_fps((fps + 3) == FRAMERATE_2997 ? 299700 : 300000); + vpriv->nom_delta_pts = parse_fps((fps + 3) == FRAMERATE_2997 ? 30000.0/1001.0 : 30.0); } //in pce_ptr starting from bit 0 bit 24 is tff, bit 30 is rff, |