diff options
Diffstat (limited to 'video/out/opengl/hwdec_osx.c')
-rw-r--r-- | video/out/opengl/hwdec_osx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/video/out/opengl/hwdec_osx.c b/video/out/opengl/hwdec_osx.c index 69e8ca9d09..8bbe54bd4c 100644 --- a/video/out/opengl/hwdec_osx.c +++ b/video/out/opengl/hwdec_osx.c @@ -72,8 +72,12 @@ static int init(struct ra_hwdec *hw) .hw_imgfmt = IMGFMT_VIDEOTOOLBOX, }; - av_hwdevice_ctx_create(&p->hwctx.av_device_ref, AV_HWDEVICE_TYPE_VIDEOTOOLBOX, - NULL, NULL, 0); + int ret = av_hwdevice_ctx_create(&p->hwctx.av_device_ref, + AV_HWDEVICE_TYPE_VIDEOTOOLBOX, NULL, NULL, 0); + if (ret != 0) { + MP_VERBOSE(hw, "Failed to create hwdevice_ctx: %s\n", av_err2str(ret)); + return -1; + } hwdec_devices_add(hw->devs, &p->hwctx); |