summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec_osx.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/hwdec_osx.c')
-rw-r--r--video/out/opengl/hwdec_osx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/opengl/hwdec_osx.c b/video/out/opengl/hwdec_osx.c
index 9980e8483b..ca7a0049c2 100644
--- a/video/out/opengl/hwdec_osx.c
+++ b/video/out/opengl/hwdec_osx.c
@@ -70,8 +70,7 @@ static int init(struct ra_hwdec *hw)
return -1;
p->hwctx = (struct mp_hwdec_ctx){
- .type = HWDEC_VIDEOTOOLBOX,
- .ctx = &p->hwctx,
+ .driver_name = hw->driver->name,
};
av_hwdevice_ctx_create(&p->hwctx.av_device_ref, AV_HWDEVICE_TYPE_VIDEOTOOLBOX,
@@ -86,8 +85,7 @@ static void uninit(struct ra_hwdec *hw)
{
struct priv_owner *p = hw->priv;
- if (p->hwctx.ctx)
- hwdec_devices_remove(hw->devs, &p->hwctx);
+ hwdec_devices_remove(hw->devs, &p->hwctx);
av_buffer_unref(&p->hwctx.av_device_ref);
}