summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authoruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-14 12:29:20 +0000
committeruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-14 12:29:20 +0000
commita703241aa9774c0a4024ab8fd7384088f8874f91 (patch)
tree00c35f263a7c5f3925e983ab8f081141d008fbf8 /mencoder.c
parent2d8010498de3bb9209223ba7ebcebd01f92865b0 (diff)
downloadmpv-a703241aa9774c0a4024ab8fd7384088f8874f91.tar.bz2
mpv-a703241aa9774c0a4024ab8fd7384088f8874f91.tar.xz
Update OSD contents only after the correct values for the frame are known.
The most visible inaccuracy caused by the previous update location was that the OSD always showed position 0 after seeking with demux_mkv. Split frame decoding and filtering because with -correct-pts the pts value that should be displayed for the frame is only known after decoding but is needed before filtering (during which the OSD is drawn). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20918 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mencoder.c b/mencoder.c
index 350dc02110..472a1ef3bb 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1322,8 +1322,9 @@ case VCODEC_FRAMENO:
break;
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,
+ {void *decoded_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), MP_NOPTS_VALUE);
+ blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);}
if (sh_video->vf_inited < 0) mencoder_exit(1, NULL);
@@ -1696,7 +1697,9 @@ 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, MP_NOPTS_VALUE);
+ void *decoded_frame = decode_video(sh_video, frame_data->start, frame_data->in_size, !softskip, MP_NOPTS_VALUE);
+ if (decoded_frame)
+ filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);
}
if (print_info) mp_msg(MSGT_MENCODER, MSGL_STATUS,