diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-10 09:59:44 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-10 09:59:44 +0000 |
commit | a43dd21a80fc798e8bd3dbf53aa1e5b19e482def (patch) | |
tree | 0d7bf06f9c70c25b11242927fe184c7bd64106c0 | |
parent | 81bf2c97993bd28191ae5f8813f5ec9f088475cc (diff) | |
download | mpv-a43dd21a80fc798e8bd3dbf53aa1e5b19e482def.tar.bz2 mpv-a43dd21a80fc798e8bd3dbf53aa1e5b19e482def.tar.xz |
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
-rw-r--r-- | libmpdemux/video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpdemux/video.c b/libmpdemux/video.c index 3afe5a7058..6d05cdf947 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -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; } } |