summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-01-15 01:07:12 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-01-15 01:09:21 +0200
commitd419ecd161634e79dab3ac57d57c4bccba2adcdc (patch)
tree7b13f4db6a141bb1c1f08afc4e3a71552618d8ec /mencoder.c
parent2d532689fcc96deaa8ae8c05c34e315cfcef8350 (diff)
downloadmpv-d419ecd161634e79dab3ac57d57c4bccba2adcdc.tar.bz2
mpv-d419ecd161634e79dab3ac57d57c4bccba2adcdc.tar.xz
OSD: Ensure that OSD content is drawn in filter-added frames
Move the OSD drawing calls from filter_video() to higher-level code to ensure that VOs will draw the OSD also in filter-added frames, which are displayed without a separate call to filter_video().
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mencoder.c b/mencoder.c
index 52edeeac88..600afd1276 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1346,7 +1346,13 @@ default:
sh_video->vfilter->control(sh_video->vfilter, VFCTRL_SET_OSD_OBJ, osd);
{void *decoded_frame = decode_video(sh_video,frame_data.start,frame_data.in_size,
skip_flag>0 && (!sh_video->vfilter || 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, osd);}
+ blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);
+ if (blit_frame) {
+ struct vf_instance *vf = sh_video->vfilter;
+ vf->control(vf, VFCTRL_DRAW_EOSD, NULL);
+ vf->control(vf, VFCTRL_DRAW_OSD, osd);
+ }
+ }
if (sh_video->vf_initialized < 0) mencoder_exit(1, NULL);
@@ -1711,7 +1717,11 @@ static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_au
int softskip = (vfilter->control(vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) == CONTROL_TRUE);
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, osd);
+ if (filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE)) {
+ struct vf_instance *vf = sh_video->vfilter;
+ vf->control(vf, VFCTRL_DRAW_EOSD, NULL);
+ vf->control(vf, VFCTRL_DRAW_OSD, osd);
+ }
}
if (print_info) mp_msg(MSGT_MENCODER, MSGL_STATUS,