diff options
author | wm4 <wm4@nowhere> | 2012-10-21 15:54:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-24 21:56:34 +0200 |
commit | f80a32a8ebd1573f1578d707416b07880c1a08c1 (patch) | |
tree | 908845c81c04e393ce28beef519f6f6cfedc47ea /libmpcodecs | |
parent | 0c49ddc818fee8059d764f7fbd25820584f335a3 (diff) | |
download | mpv-f80a32a8ebd1573f1578d707416b07880c1a08c1.tar.bz2 mpv-f80a32a8ebd1573f1578d707416b07880c1a08c1.tar.xz |
core: do not try to redraw OSD if VO doesn't support OSD
This fixes awkward framestepping when seeking with -vo null while paused
(caused because seeking by default draws an OSD bar, and mplayer trying
to redraw the OSD in that case; this logic is actually needed with
vo_xv).
It would have been simpler to just check vo->driver->draw_osd (and leave
that callback to NULL for VOs which don't support OSD), but for now try
to retain the capability to let VOs decide based on the image format
whether to support OSD or not.
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_vo.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c index 16d10f0cdc..d11724f881 100644 --- a/libmpcodecs/vf_vo.c +++ b/libmpcodecs/vf_vo.c @@ -37,7 +37,6 @@ struct vf_priv_s { }; #define video_out (vf->priv->vo) -static int query_format(struct vf_instance *vf, unsigned int fmt); static void draw_slice(struct vf_instance *vf, unsigned char **src, int *stride, int w, int h, int x, int y); @@ -66,13 +65,13 @@ static int config(struct vf_instance *vf, if (info->comment && strlen(info->comment) > 0) mp_msg(MSGT_CPLAYER, MSGL_V, "VO: Comment: %s\n", info->comment); - // save vo's stride capability for the wanted colorspace: - vf->default_caps = query_format(vf, outfmt); - vf->draw_slice = (vf->default_caps & VOCAP_NOSLICES) ? NULL : draw_slice; - if (vo_config(video_out, width, height, d_width, d_height, flags, outfmt)) return 0; + // save vo's stride capability for the wanted colorspace: + vf->default_caps = video_out->default_caps; + vf->draw_slice = (vf->default_caps & VOCAP_NOSLICES) ? NULL : draw_slice; + return 1; } |