summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demux_avi.c2
-rw-r--r--mplayer.c5
-rw-r--r--stheader.h1
3 files changed, 5 insertions, 3 deletions
diff --git a/demux_avi.c b/demux_avi.c
index 7228b7c160..0ccd4c444f 100644
--- a/demux_avi.c
+++ b/demux_avi.c
@@ -519,7 +519,7 @@ void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){
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 --git a/mplayer.c b/mplayer.c
index e160d90b70..b9a22f895f 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1223,6 +1223,7 @@ if(1)
// 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 @@ if(1)
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 --git a/stheader.h b/stheader.h
index 367151aa65..daf55ca727 100644
--- a/stheader.h
+++ b/stheader.h
@@ -56,6 +56,7 @@ typedef struct {
// 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;