[MPlayer-cvslog] CVS: main/libmpdemux muxer_mpeg.c,1.19,1.20
Richard Felker CVS
syncmail at mplayerhq.hu
Wed Aug 10 03:42:08 CEST 2005
CVS change done by Richard Felker CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv9830/libmpdemux
Modified Files:
muxer_mpeg.c
Log Message:
reconcile with earlier fps fix in mpeg header parser
Index: muxer_mpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_mpeg.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- muxer_mpeg.c 1 Aug 2005 18:36:50 -0000 1.19
+++ muxer_mpeg.c 10 Aug 2005 01:42:06 -0000 1.20
@@ -1849,26 +1849,26 @@
}
-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 @@
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,
More information about the MPlayer-cvslog
mailing list