summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-28 19:59:11 +0100
committerwm4 <wm4@nowhere>2015-11-28 20:10:01 +0100
commit9fc74d5acd6fcc9b521a78ecfa9dc0ec3487fc8b (patch)
tree63e5a58daf2b5aa75c1e881aa523fe45cfa4aa2a
parent2b07d3eb473edf3670f2277be872973da3831f28 (diff)
downloadmpv-9fc74d5acd6fcc9b521a78ecfa9dc0ec3487fc8b.tar.bz2
mpv-9fc74d5acd6fcc9b521a78ecfa9dc0ec3487fc8b.tar.xz
vo_opengl: warn if interpolation is enabled, but not display-sync
Try to avoid user confusion. Reading the global options in this place is a pretty disgusting hack, but it's still the most robust way.
-rw-r--r--video/out/opengl/video.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 2436ffdfe3..70e98aeea1 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -33,6 +33,8 @@
#include "misc/bstr.h"
#include "options/m_config.h"
+#include "common/global.h"
+#include "options/options.h"
#include "common.h"
#include "utils.h"
#include "hwdec.h"
@@ -225,6 +227,8 @@ struct gl_video {
struct gl_hwdec *hwdec;
bool hwdec_active;
+
+ bool dsi_warned;
};
struct fmt_entry {
@@ -2846,6 +2850,12 @@ void gl_video_set_options(struct gl_video *p, struct gl_video_opts *opts)
check_gl_features(p);
uninit_rendering(p);
+
+ if (p->opts.interpolation && !p->global->opts->video_sync && !p->dsi_warned) {
+ MP_WARN(p, "Interpolation now requires enabling display-sync mode.\n"
+ "E.g.: --video-sync=display-resample\n");
+ p->dsi_warned = true;
+ }
}
void gl_video_configure_queue(struct gl_video *p, struct vo *vo)