mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
-frames 0 fix, multifile frames support by tibcu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6591 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4f40ec312c
commit
d8fd7131bb
@ -49,7 +49,7 @@
|
|||||||
// ------------------------- demuxer options --------------------
|
// ------------------------- demuxer options --------------------
|
||||||
|
|
||||||
// number of frames to play/convert
|
// number of frames to play/convert
|
||||||
{"frames", &play_n_frames, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
|
{"frames", &play_n_frames_mf, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
|
||||||
|
|
||||||
// seek to byte/seconds position
|
// seek to byte/seconds position
|
||||||
{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
|
{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
|
||||||
|
@ -153,6 +153,7 @@ char* passtmpfile="divx2pass.log";
|
|||||||
int pass_working=0;
|
int pass_working=0;
|
||||||
|
|
||||||
static int play_n_frames=-1;
|
static int play_n_frames=-1;
|
||||||
|
static int play_n_frames_mf=-1;
|
||||||
|
|
||||||
#include "libvo/font_load.h"
|
#include "libvo/font_load.h"
|
||||||
#include "libvo/sub.h"
|
#include "libvo/sub.h"
|
||||||
@ -800,6 +801,8 @@ if(tv_param_on == 1)
|
|||||||
default_max_pts_correction = 0;
|
default_max_pts_correction = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
play_n_frames=play_n_frames_mf;
|
||||||
|
|
||||||
while(!at_eof){
|
while(!at_eof){
|
||||||
|
|
||||||
float frame_time=0;
|
float frame_time=0;
|
||||||
|
@ -233,6 +233,7 @@ static float force_fps=0;
|
|||||||
static int force_srate=0;
|
static int force_srate=0;
|
||||||
static int frame_dropping=0; // option 0=no drop 1= drop vo 2= drop decode
|
static int frame_dropping=0; // option 0=no drop 1= drop vo 2= drop decode
|
||||||
static int play_n_frames=-1;
|
static int play_n_frames=-1;
|
||||||
|
static int play_n_frames_mf=-1;
|
||||||
|
|
||||||
// screen info:
|
// screen info:
|
||||||
char* video_driver=NULL; //"mga"; // default
|
char* video_driver=NULL; //"mga"; // default
|
||||||
@ -1489,12 +1490,18 @@ if (dvd_nav && stream->type==STREAMTYPE_DVDNAV) {
|
|||||||
total_time_usage_start=GetTimer();
|
total_time_usage_start=GetTimer();
|
||||||
audio_time_usage=0; video_time_usage=0; vout_time_usage=0;
|
audio_time_usage=0; video_time_usage=0; vout_time_usage=0;
|
||||||
total_frame_cnt=0; drop_frame_cnt=0; // fix for multifile fps benchmark
|
total_frame_cnt=0; drop_frame_cnt=0; // fix for multifile fps benchmark
|
||||||
|
play_n_frames=play_n_frames_mf;
|
||||||
|
|
||||||
|
if(play_n_frames==0){
|
||||||
|
eof=PT_NEXT_ENTRY; goto goto_next_file;
|
||||||
|
}
|
||||||
|
|
||||||
while(!eof){
|
while(!eof){
|
||||||
float aq_sleep_time=0;
|
float aq_sleep_time=0;
|
||||||
|
|
||||||
if(play_n_frames>=0){
|
if(play_n_frames>=0){
|
||||||
--play_n_frames;
|
--play_n_frames;
|
||||||
if(play_n_frames<0) eof = PT_NEXT_ENTRY;
|
if(play_n_frames<=0) eof = PT_NEXT_ENTRY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*========================== PLAY AUDIO ============================*/
|
/*========================== PLAY AUDIO ============================*/
|
||||||
|
Loading…
Reference in New Issue
Block a user