diff options
author | wm4 <wm4@nowhere> | 2014-12-22 12:49:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-22 12:49:20 +0100 |
commit | 2b9a7c4b5bc5697241cb8e1448b2056d20b50b77 (patch) | |
tree | 32bd4391ef66c54d73f79df1f1461f390b39a7b3 /video/out/vo_opengl_cb.c | |
parent | cb347a9d05bf826f645c6d42b80db014cfc31827 (diff) | |
download | mpv-2b9a7c4b5bc5697241cb8e1448b2056d20b50b77.tar.bz2 mpv-2b9a7c4b5bc5697241cb8e1448b2056d20b50b77.tar.xz |
vo_opengl, vo_opengl_cb: check GL version in renderer
vo_opengl actually checks this in the context creation code already, but
it still increases robustness in case the requirements are changed
later.
Diffstat (limited to 'video/out/vo_opengl_cb.c')
-rw-r--r-- | video/out/vo_opengl_cb.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c index 363b6a333f..c0870d3b42 100644 --- a/video/out/vo_opengl_cb.c +++ b/video/out/vo_opengl_cb.c @@ -143,12 +143,9 @@ int mpv_opengl_cb_init_gl(struct mpv_opengl_cb_context *ctx, const char *exts, mpgl_load_functions2(ctx->gl, get_proc_address, get_proc_address_ctx, exts, ctx->log); - int caps = MPGL_CAP_GL21; - if ((ctx->gl->mpgl_caps & caps) != caps) { - MP_FATAL(ctx, "Missing OpenGL features.\n"); - return MPV_ERROR_UNSUPPORTED; - } ctx->renderer = gl_video_init(ctx->gl, ctx->log, ctx->osd); + if (!ctx->renderer) + return MPV_ERROR_UNSUPPORTED; ctx->hwdec = gl_hwdec_load_api(ctx->log, ctx->gl, ctx->hwapi, &ctx->hwdec_info); gl_video_set_hwdec(ctx->renderer, ctx->hwdec); |