diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-03 10:09:09 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-03 10:09:09 +0000 |
commit | a40429d6ce2325c9aea04810fdcf11e44e8b1f3d (patch) | |
tree | 19c0a036b1d3f95a005feeea9499bbc29dc5a04d | |
parent | eed786ceefc44a954a0a110537d4693331a27009 (diff) | |
download | mpv-a40429d6ce2325c9aea04810fdcf11e44e8b1f3d.tar.bz2 mpv-a40429d6ce2325c9aea04810fdcf11e44e8b1f3d.tar.xz |
Do not count skipped/broken frames when using -frames
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15896 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | mencoder.c | 2 | ||||
-rw-r--r-- | mplayer.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/mencoder.c b/mencoder.c index beed3a1e71..8e1a454252 100644 --- a/mencoder.c +++ b/mencoder.c @@ -1273,6 +1273,8 @@ default: if (sh_video->vf_inited < 0) mencoder_exit(1, NULL); if(!blit_frame){ + if (play_n_frames >= 0) + play_n_frames++; badframes++; if(skip_flag<=0){ // unwanted skipping of a frame, what to do? @@ -2240,11 +2240,6 @@ if(play_n_frames==0){ while(!eof){ float aq_sleep_time=0; - if(play_n_frames>=0){ - --play_n_frames; - if(play_n_frames<0) eof = PT_NEXT_ENTRY; - } - /*========================== PLAY AUDIO ============================*/ while(sh_audio){ @@ -2521,6 +2516,11 @@ if(time_frame>0.001 && !(vo_flags&256)){ /* printf ("PANIC: too slow frame (%.3f)!\n", j); */ if(vo_config_count) video_out->flip_page(); + if (play_n_frames >= 0) { + --play_n_frames; + if (play_n_frames < 0) eof = PT_NEXT_ENTRY; + } + // usec_sleep(50000); // test only! t2=GetTimer()-t2; tt = t2*0.000001f; |