[Mplayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.58,1.59

Arpi of Ize arpi at mplayer.dev.hu
Mon Apr 15 04:48:14 CEST 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv30662

Modified Files:
	demux_mov.c 
Log Message:
FPS calculation fixed

Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- demux_mov.c	15 Apr 2002 01:58:18 -0000	1.58
+++ demux_mov.c	15 Apr 2002 02:48:11 -0000	1.59
@@ -457,14 +457,6 @@
 		    trak->durmap[i].num=stream_read_dword(demuxer->stream);
 		    trak->durmap[i].dur=stream_read_dword(demuxer->stream);
 		    pts+=trak->durmap[i].num*trak->durmap[i].dur;
-		    
-		    if(i==0 && trak->type == MOV_TRAK_VIDEO)
-		    {
-		    sh_video_t* sh=get_sh_video(demuxer,priv->track_db);
-		    if (sh && !sh->fps)
-			sh->fps = trak->timescale/trak->durmap[i].dur;
-		    /* initial fps */
-		    }
 		}
 		if(trak->length!=pts) mp_msg(MSGT_DEMUX, MSGL_WARN, "Warning! pts=%d  length=%d\n",pts,trak->length);
 		break;
@@ -876,7 +868,8 @@
 //		   printf("pos=%d max=%d\n",pos,trak->stdata_len);
 		  }
 		}
-		if(!sh->fps) sh->fps=trak->timescale;
+		sh->fps=trak->timescale/
+		    ((trak->durmap_size>=1)?(float)trak->durmap[0].dur:1);
 		sh->frametime=1.0f/sh->fps;
 
 		sh->disp_w=trak->stdata[25]|(trak->stdata[24]<<8);




More information about the MPlayer-cvslog mailing list