mirror of https://github.com/mpv-player/mpv
feed something (hopefully correct timestamps) into the video filter chain
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17911 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a812e6fc3c
commit
87323740ed
|
@ -304,7 +304,7 @@ return 1; // success
|
|||
|
||||
extern int vo_directrendering;
|
||||
|
||||
int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){
|
||||
int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame, double pts){
|
||||
vf_instance_t* vf;
|
||||
mp_image_t *mpi=NULL;
|
||||
unsigned int t=GetTimer();
|
||||
|
@ -336,7 +336,7 @@ if(!mpi || drop_frame) return 0; // error / skipped frame
|
|||
|
||||
//vo_draw_image(video_out,mpi);
|
||||
vf=sh_video->vfilter;
|
||||
ret = vf->put_image(vf,mpi, MP_NOPTS_VALUE); // apply video filters and call the leaf vo/ve
|
||||
ret = vf->put_image(vf,mpi, pts); // apply video filters and call the leaf vo/ve
|
||||
if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL);
|
||||
|
||||
t2=GetTimer()-t2;
|
||||
|
|
|
@ -10,7 +10,7 @@ extern int init_best_video_codec(sh_video_t *sh_video,char** video_codec_list,ch
|
|||
extern int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status);
|
||||
extern void uninit_video(sh_video_t *sh_video);
|
||||
|
||||
extern int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame);
|
||||
extern int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame, double pts);
|
||||
|
||||
extern int get_video_quality_max(sh_video_t *sh_video);
|
||||
extern void set_video_quality(sh_video_t *sh_video,int quality);
|
||||
|
|
|
@ -1321,7 +1321,7 @@ case VCODEC_FRAMENO:
|
|||
default:
|
||||
// decode_video will callback down to ve_*.c encoders, through the video filters
|
||||
blit_frame=decode_video(sh_video,frame_data.start,frame_data.in_size,
|
||||
skip_flag>0 && (!sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE));
|
||||
skip_flag>0 && (!sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE), mux_v->timer);
|
||||
|
||||
if (sh_video->vf_inited < 0) mencoder_exit(1, NULL);
|
||||
|
||||
|
@ -1739,7 +1739,7 @@ static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_au
|
|||
|
||||
if (vfilter) {
|
||||
int softskip = (vfilter->control(vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) == CONTROL_TRUE);
|
||||
decode_video(sh_video, frame_data->start, frame_data->in_size, !softskip);
|
||||
decode_video(sh_video, frame_data->start, frame_data->in_size, !softskip, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
#ifdef USE_EDL
|
||||
|
|
|
@ -2693,7 +2693,7 @@ if(!sh_video) {
|
|||
// decode:
|
||||
current_module="decode_video";
|
||||
// printf("Decode! %p %d \n",start,in_size);
|
||||
blit_frame=decode_video(sh_video,start,in_size,drop_frame);
|
||||
blit_frame=decode_video(sh_video,start,in_size,drop_frame, MP_NOPTS_VALUE);
|
||||
break;
|
||||
}
|
||||
vdecode_time=video_time_usage-vdecode_time;
|
||||
|
|
Loading…
Reference in New Issue