From a9571fcc0f3d8c3f9033170660dc3b39103b2867 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Aug 2017 15:15:34 +0200 Subject: 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. --- sub/osd.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sub/osd.h') diff --git a/sub/osd.h b/sub/osd.h index d139647718..114ab4a8f1 100644 --- a/sub/osd.h +++ b/sub/osd.h @@ -82,6 +82,8 @@ struct mp_osd_res { double display_par; }; +bool osd_res_equals(struct mp_osd_res a, struct mp_osd_res b); + // 0 <= sub_bitmaps.render_index < MAX_OSD_PARTS #define MAX_OSD_PARTS 5 -- cgit v1.2.3