summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-23 16:32:59 +0100
committerwm4 <wm4@nowhere>2015-03-23 16:32:59 +0100
commit167b75c50c673bc477d0b18b38cd1d20292ce8b8 (patch)
tree0c3143fa9cb40e25170cff23754a2a7dce1c8920 /video/out/gl_video.h
parent67bdad9a43ba965b73e5914da2e46db8866dc14e (diff)
downloadmpv-167b75c50c673bc477d0b18b38cd1d20292ce8b8.tar.bz2
mpv-167b75c50c673bc477d0b18b38cd1d20292ce8b8.tar.xz
vo_opengl_cb: don't render OSD while VO is not created
Unlike other VOs, this rendered OSD even while no VO was created (because the renderer lives as long as the API user wants). Change this, and refactor the code so that the OSD object is accessible only while the VO is created. (There is a short time where the OSD can still be accessed even after VO destruction - this is not a race condition, though it's inelegant and unfortunately unavoidable.)
Diffstat (limited to 'video/out/gl_video.h')
-rw-r--r--video/out/gl_video.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/gl_video.h b/video/out/gl_video.h
index 8ec59895a1..6ed39c71d3 100644
--- a/video/out/gl_video.h
+++ b/video/out/gl_video.h
@@ -64,8 +64,9 @@ extern const struct gl_video_opts gl_video_opts_def;
struct gl_video;
-struct gl_video *gl_video_init(GL *gl, struct mp_log *log, struct osd_state *osd);
+struct gl_video *gl_video_init(GL *gl, struct mp_log *log);
void gl_video_uninit(struct gl_video *p);
+void gl_video_set_osd_source(struct gl_video *p, struct osd_state *osd);
void gl_video_set_options(struct gl_video *p, struct gl_video_opts *opts,
int *queue_size);
bool gl_video_check_format(struct gl_video *p, int mp_format);