summaryrefslogtreecommitdiffstats
path: root/sub/osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-29 15:15:34 +0200
committerwm4 <wm4@nowhere>2017-08-29 15:15:34 +0200
commita9571fcc0f3d8c3f9033170660dc3b39103b2867 (patch)
tree2e054cd1ac38800927c09440b3451ede6b0d0fe8 /sub/osd.c
parenta46500a2c820222c0aaa4c4c384d4d7df9eb8414 (diff)
downloadmpv-a9571fcc0f3d8c3f9033170660dc3b39103b2867.tar.bz2
mpv-a9571fcc0f3d8c3f9033170660dc3b39103b2867.tar.xz
vo_opengl: don't discard buffered video on redundant resize calls
If a VO-area option changes, gl_video_resize() is called unconditionally. This function does something even if the size does not change (at least it discards buffered frames for interpolation), which can lead to stutter when you keep firing option change events during playback. Check for an actual resize, and if nothing changes, exit early.
Diffstat (limited to 'sub/osd.c')
-rw-r--r--sub/osd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sub/osd.c b/sub/osd.c
index 9517595ff3..0d594cd24d 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -104,7 +104,7 @@ const struct m_sub_options sub_style_conf = {
.change_flags = UPDATE_OSD,
};
-static bool osd_res_equals(struct mp_osd_res a, struct mp_osd_res b)
+bool osd_res_equals(struct mp_osd_res a, struct mp_osd_res b)
{
return a.w == b.w && a.h == b.h && a.ml == b.ml && a.mt == b.mt
&& a.mr == b.mr && a.mb == b.mb