# HG changeset patch # User arpi # Date 997923831 0 # Node ID d4cd08b066651c979895d8d1bfa424b26b243c84 # Parent da26060c81ef4212eb71f06e47ce9ee2b9f921c1 display number of decoded frames (for progr. mpeg2) diff -r da26060c81ef -r d4cd08b06665 demux_avi.c --- a/demux_avi.c Thu Aug 16 00:50:02 2001 +0000 +++ b/demux_avi.c Thu Aug 16 01:03:51 2001 +0000 @@ -519,7 +519,7 @@ int id=((AVIINDEXENTRY *)priv->idx)[i].ckid; if(avi_stream_id(id)==d_video->id) ++d_video->pack_no; } - sh_video->num_frames=d_video->pack_no; + sh_video->num_frames=sh_video->num_frames_decoded=d_video->pack_no; priv->avi_video_pts=d_video->pack_no*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate; d_video->pos=video_chunk_pos; diff -r da26060c81ef -r d4cd08b06665 mplayer.c --- a/mplayer.c Thu Aug 16 00:50:02 2001 +0000 +++ b/mplayer.c Thu Aug 16 01:03:51 2001 +0000 @@ -1223,6 +1223,7 @@ // Increase video timers: sh_video->num_frames+=frame_time; + ++sh_video->num_frames_decoded; frame_time*=sh_video->frametime; if(file_format==DEMUXER_TYPE_ASF && !force_fps){ // .ASF files has no fixed FPS - just frame durations! @@ -1377,9 +1378,9 @@ else max_pts_correction=sh_video->frametime*0.10; // +-10% of time sh_audio->timer+=x; c_total+=x; - if(!quiet) printf("A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f %3d %2d%% %2d%% %4.1f%% %d %d\r", + if(!quiet) printf("A:%6.1f V:%6.1f A-V:%7.3f ct:%7.3f %3d/%3d %2d%% %2d%% %4.1f%% %d %d\r", a_pts-audio_delay-delay,v_pts,AV_delay,c_total, - (int)sh_video->num_frames, + (int)sh_video->num_frames,(int)sh_video->num_frames_decoded, (sh_video->timer>0.5)?(int)(100.0*video_time_usage/(double)sh_video->timer):0, (sh_video->timer>0.5)?(int)(100.0*vout_time_usage/(double)sh_video->timer):0, (sh_video->timer>0.5)?(100.0*audio_time_usage/(double)sh_video->timer):0 diff -r da26060c81ef -r d4cd08b06665 stheader.h --- a/stheader.h Thu Aug 16 00:50:02 2001 +0000 +++ b/stheader.h Thu Aug 16 01:03:51 2001 +0000 @@ -56,6 +56,7 @@ // unsigned int bitrate; // buffers: float num_frames; // number of frames played + int num_frames_decoded; // number of frames decoded char *our_out_buffer; // win32 codec stuff: AVIStreamHeader video;