summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r--libvo/video_out.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 7e1360ecf5..c16968574d 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -38,6 +38,7 @@
#include "mp_fifo.h"
#include "m_config.h"
#include "mp_msg.h"
+#include "libmpcodecs/vfcap.h"
#include "osdep/shmem.h"
#ifdef CONFIG_X11
@@ -50,7 +51,6 @@ int xinerama_y;
int vo_nomouse_input = 0;
int vo_grabpointer = 1;
-int vo_doublebuffering = 1;
int vo_vsync = 1;
int vo_fs = 0;
int vo_fsmode = 0;
@@ -225,9 +225,8 @@ void vo_new_frame_imminent(struct vo *vo)
void vo_draw_osd(struct vo *vo, struct osd_state *osd)
{
- if (!vo->config_ok)
- return;
- vo->driver->draw_osd(vo, osd);
+ if (vo->config_ok && (vo->default_caps & VFCAP_OSD))
+ vo->driver->draw_osd(vo, osd);
}
void vo_flip_page(struct vo *vo, unsigned int pts_us, int duration)
@@ -371,8 +370,7 @@ int vo_config(struct vo *vo, uint32_t width, uint32_t height,
{
struct MPOpts *opts = vo->opts;
panscan_init(vo);
- aspect_save_orig(vo, width, height);
- aspect_save_prescale(vo, d_width, d_height);
+ aspect_save_videores(vo, width, height, d_width, d_height);
if (vo_control(vo, VOCTRL_UPDATE_SCREENINFO, NULL) == VO_TRUE) {
aspect(vo, &d_width, &d_height, A_NOZOOM);
@@ -387,10 +385,14 @@ int vo_config(struct vo *vo, uint32_t width, uint32_t height,
vo->dheight = d_height;
}
+ vo->default_caps = vo_control(vo, VOCTRL_QUERY_FORMAT, &format);
+
int ret = vo->driver->config(vo, width, height, d_width, d_height, flags,
format);
vo->config_ok = (ret == 0);
vo->config_count += vo->config_ok;
+ if (!vo->config_ok)
+ vo->default_caps = 0;
if (vo->registered_fd == -1 && vo->event_fd != -1 && vo->config_ok) {
mp_input_add_key_fd(vo->input_ctx, vo->event_fd, 1, event_fd_callback,
NULL, vo);