[Mplayer-cvslog] CVS: main/libmpdemux video.c,1.15,1.16
Arpi of Ize
arpi at mplayer.dev.hu
Fri Apr 12 12:48:24 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/libmpdemux aviwrite.c,1.6,1.7 aviwrite.h,1.3,1.4 demuxer.c,1.89,1.90 tv.c,1.25,1.26 tv.h,1.13,1.14 tvi_bsdbt848.c,1.2,1.3 tvi_def.h,1.6,1.7 tvi_dummy.c,1.7,1.8 tvi_v4l.c,1.19,1.20 video.c,1.14,1.15
- Next message: [Mplayer-cvslog] CVS: main/vidix/drivers mach64_vid.c,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv2990
Modified Files:
video.c
Log Message:
generalized the cut'n'pasted variable fps code, #ifdef-ed TV until v4l is updated
Index: video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/video.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- video.c 12 Apr 2002 10:40:38 -0000 1.15
+++ video.c 12 Apr 2002 10:48:21 -0000 1.16
@@ -279,37 +279,28 @@
++sh_video->num_frames_decoded;
frame_time*=sh_video->frametime;
- if(demuxer->file_format==DEMUXER_TYPE_ASF && !force_fps){
- // .ASF files has no fixed FPS - just frame durations!
+
+ // override frame_time for variable/unknown FPS formats:
+ if(!force_fps) switch(demuxer->file_format){
+#ifdef HAVE_TV_BSDBT848
+ case DEMUXER_TYPE_TV:
+#endif
+ case DEMUXER_TYPE_MOV:
+ case DEMUXER_TYPE_FILM:
+ case DEMUXER_TYPE_VIVO:
+ case DEMUXER_TYPE_ASF: {
float d=d_video->pts-pts1;
- if(d>=0 && d<5) frame_time=d;
+ if(d>0 && d<5) frame_time=d;
if(d>0){
if(verbose)
if((int)sh_video->fps==1000)
- mp_msg(MSGT_CPLAYER,MSGL_STATUS,"\rASF framerate: %d fps \n",(int)(1.0f/d));
+ mp_msg(MSGT_CPLAYER,MSGL_STATUS,"\navg. framerate: %d fps \n",(int)(1.0f/d));
sh_video->frametime=d; // 1ms
sh_video->fps=1.0f/d;
}
- } else
- if(demuxer->file_format==DEMUXER_TYPE_TV && !force_fps){
- // TV has variable video frame rate, fixed audio...
- frame_time=d_video->pts-pts1;
- } else
- if(demuxer->file_format==DEMUXER_TYPE_MOV && !force_fps){
- // .MOV files has no fixed FPS - just frame durations!
- frame_time=d_video->pts-pts1;
- } else
- if(demuxer->file_format==DEMUXER_TYPE_FILM && !force_fps){
- // FILM (CPK) files have no fixed FPS - just frame durations!
- frame_time=d_video->pts-pts1;
- } else
- if(demuxer->file_format==DEMUXER_TYPE_VIVO && !force_fps){
- // .VIVO files has no fixed FPS - just frame durations!
- if(d_video->pts-pts1>0)
- frame_time=d_video->pts-pts1;
- mp_msg(MSGT_CPLAYER,MSGL_V,"vivo frame_time=%5.3f \n",frame_time);
+ }
}
-
+
if(demuxer->file_format==DEMUXER_TYPE_MPEG_PS ||
demuxer->file_format==DEMUXER_TYPE_MPEG_ES) d_video->pts+=frame_time;
@@ -317,5 +308,4 @@
return in_size;
}
-
- Previous message: [Mplayer-cvslog] CVS: main/libmpdemux aviwrite.c,1.6,1.7 aviwrite.h,1.3,1.4 demuxer.c,1.89,1.90 tv.c,1.25,1.26 tv.h,1.13,1.14 tvi_bsdbt848.c,1.2,1.3 tvi_def.h,1.6,1.7 tvi_dummy.c,1.7,1.8 tvi_v4l.c,1.19,1.20 video.c,1.14,1.15
- Next message: [Mplayer-cvslog] CVS: main/vidix/drivers mach64_vid.c,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list