[Mplayer-cvslog] CVS: main mplayer.c,1.134,1.135
GEREOFFY
arpi_esp at users.sourceforge.net
Sat Jun 2 03:00:24 CEST 2001
Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv8267
Modified Files:
mplayer.c
Log Message:
-fps 1 fixed
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -r1.134 -r1.135
*** mplayer.c 2001/06/01 23:45:04 1.134
--- mplayer.c 2001/06/02 01:00:22 1.135
***************
*** 1578,1581 ****
--- 1578,1582 ----
sh_video->fps=force_fps;
sh_video->frametime=1.0f/sh_video->fps;
+ printf("FPS forced to be %5.3 (ftime: %5.3f)\n",sh_video->fps,sh_video->frametime);
}
***************
*** 1901,1904 ****
--- 1902,1907 ----
if(file_format==DEMUXER_TYPE_MPEG_PS) d_video->pts+=frame_time;
+
+ if(verbose>1) printf("*** ftime=%5.3f ***\n",frame_time);
if(drop_frame){
***************
*** 1909,1913 ****
time_frame=v_frame;
time_frame-=a_frame-(float)delay/(float)sh_audio->o_bps;
! if(time_frame>-0.1) drop_frame=0; // stop dropping frames
}
--- 1912,1916 ----
time_frame=v_frame;
time_frame-=a_frame-(float)delay/(float)sh_audio->o_bps;
! if(time_frame>-2*frame_time) drop_frame=0; // stop dropping frames
}
***************
*** 1924,1933 ****
time_frame-=a_frame-(float)delay/(float)sh_audio->o_bps;
// we are out of time... drop next frame!
! if(time_frame<-0.1){
drop_frame=frame_dropping; // tricky!
++drop_frame_cnt;
}
} else {
! if(time_frame<-0.1 || time_frame>0.1) time_frame=0;
}
--- 1927,1936 ----
time_frame-=a_frame-(float)delay/(float)sh_audio->o_bps;
// we are out of time... drop next frame!
! if(time_frame<-2*frame_time){
drop_frame=frame_dropping; // tricky!
++drop_frame_cnt;
}
} else {
! if(time_frame<-3*frame_time || time_frame>3*frame_time) time_frame=0;
}
***************
*** 2197,2219 ****
int video_chunk_pos=d_video->pos;
! skip_video_frames=0;
!
! // SEEK streams
! // if(d_video->pts) avi_video_pts=d_video->pts;
avi_audio_pts=0;
-
- // Done by ds_free_packs():
- //d_video->pts=0;
- //d_audio->pts=0;
! // find video chunk pos:
if(rel_seek_frames>0){
// seek forward
while(video_chunk_pos<demuxer->idx_size){
int id=((AVIINDEXENTRY *)demuxer->idx)[video_chunk_pos].ckid;
- // if(LOWORD(id)==aviTWOCC('0','0')){ // video frame
if(avi_stream_id(id)==d_video->id){ // video frame
if((--rel_seek_frames)<0 && ((AVIINDEXENTRY *)demuxer->idx)[video_chunk_pos].dwFlags&AVIIF_KEYFRAME) break;
- //v_pts+=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
++skip_audio_bytes;
}
--- 2200,2213 ----
int video_chunk_pos=d_video->pos;
! skip_video_frames=0;
avi_audio_pts=0;
! // find nearest video keyframe chunk pos:
if(rel_seek_frames>0){
// seek forward
while(video_chunk_pos<demuxer->idx_size){
int id=((AVIINDEXENTRY *)demuxer->idx)[video_chunk_pos].ckid;
if(avi_stream_id(id)==d_video->id){ // video frame
if((--rel_seek_frames)<0 && ((AVIINDEXENTRY *)demuxer->idx)[video_chunk_pos].dwFlags&AVIIF_KEYFRAME) break;
++skip_audio_bytes;
}
***************
*** 2224,2231 ****
while(video_chunk_pos>=0){
int id=((AVIINDEXENTRY *)demuxer->idx)[video_chunk_pos].ckid;
- // if(LOWORD(id)==aviTWOCC('0','0')){ // video frame
if(avi_stream_id(id)==d_video->id){ // video frame
if((++rel_seek_frames)>0 && ((AVIINDEXENTRY *)demuxer->idx)[video_chunk_pos].dwFlags&AVIIF_KEYFRAME) break;
- //v_pts-=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
--skip_audio_bytes;
}
--- 2218,2223 ----
***************
*** 2236,2240 ****
// printf("%d frames skipped\n",skip_audio_bytes);
- #if 1
// re-calc video pts:
d_video->pack_no=0;
--- 2228,2231 ----
***************
*** 2245,2256 ****
avi_video_pts=d_video->pack_no*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
- //printf("v-pts recalc! %5.3f -> %5.3f \n",v_pts,avi_video_pts);
- //v_pts=avi_video_pts;
- //#else
- //avi_video_pts=v_pts;
- #endif
- //a_pts=avi_video_pts;
- //a_pts=v_pts; //-(buffer_delay+audio_delay);
-
if(has_audio){
int i;
--- 2236,2239 ----
***************
*** 2442,2446 ****
force_redraw=5;
a_frame=-skip_audio_secs;
- // a_frame=-audio_delay-buffer_delay-skip_audio_secs;
v_frame=0; // !!!!!!
audio_time_usage=0; video_time_usage=0; vout_time_usage=0;
--- 2425,2428 ----
***************
*** 2493,2497 ****
} // while(!eof)
- //printf("\nEnd of file.\n");
exit_player("End of file");
}
--- 2475,2478 ----
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list