summaryrefslogtreecommitdiffstats
path: root/video/out/hwdec/hwdec_cuda_gl.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/hwdec/hwdec_cuda_gl.c')
-rw-r--r--video/out/hwdec/hwdec_cuda_gl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/hwdec/hwdec_cuda_gl.c b/video/out/hwdec/hwdec_cuda_gl.c
index 0e6160da87..f20540ed4d 100644
--- a/video/out/hwdec/hwdec_cuda_gl.c
+++ b/video/out/hwdec/hwdec_cuda_gl.c
@@ -17,9 +17,9 @@
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
#include "hwdec_cuda.h"
#include "options/m_config.h"
+#include "options/options.h"
#include "video/out/opengl/formats.h"
#include "video/out/opengl/ra_gl.h"
@@ -111,8 +111,8 @@ bool cuda_gl_init(const struct ra_hwdec *hw) {
struct cuda_hw_priv *p = hw->priv;
CudaFunctions *cu = p->cu;
- if (ra_is_gl(hw->ra)) {
- GL *gl = ra_gl_get(hw->ra);
+ if (ra_is_gl(hw->ra_ctx->ra)) {
+ GL *gl = ra_gl_get(hw->ra_ctx->ra);
if (gl->version < 210 && gl->es < 300) {
MP_VERBOSE(hw, "need OpenGL >= 2.1 or OpenGL-ES >= 3.0\n");
return false;
@@ -136,9 +136,9 @@ bool cuda_gl_init(const struct ra_hwdec *hw) {
p->decode_ctx = p->display_ctx;
- int decode_dev_idx = -1;
- mp_read_option_raw(hw->global, "cuda-decode-device", &m_option_type_choice,
- &decode_dev_idx);
+ struct cuda_opts *opts = mp_get_config_group(NULL, hw->global, &cuda_conf);
+ int decode_dev_idx = opts->cuda_device;
+ talloc_free(opts);
if (decode_dev_idx > -1) {
CUcontext dummy;