Fix asf stream wich were giving invalid frame times because the frame time

was 0.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6372 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2002-06-10 09:59:44 +00:00
parent 81bf2c9799
commit a43dd21a80
1 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char**
case DEMUXER_TYPE_ASF: {
float next_pts = ds_get_next_pts(d_video);
float d= next_pts > 0 ? next_pts - d_video->pts : d_video->pts-pts1;
if(d>0){
if(d>=0){
if(verbose)
if((int)sh_video->fps==1000)
mp_msg(MSGT_CPLAYER,MSGL_STATUS,"\navg. framerate: %d fps \n",(int)(1.0f/d));
@ -301,7 +301,7 @@ int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char**
sh_video->fps=1.0f/d;
frame_time = d;
} else {
mp_msg(MSGT_CPLAYER,MSGL_WARN,"\nInvalid frame duration value. Defaulting to 1/25 sec.\n");
mp_msg(MSGT_CPLAYER,MSGL_WARN,"\nInvalid frame duration value (%2.5f/%2.5f => %2.5f). Defaulting to 1/25 sec.\n",d_video->pts,next_pts,d);
frame_time = 1/25.0;
}
}