diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
commit | ad56f2c46ac6deec86870ec10f2a11a644df07d4 (patch) | |
tree | 89f2d90c5586560911e67c872b530c77f151168d /video/decode/videotoolbox.c | |
parent | 0536841647ef7931bffb4386d8ffbb5b2b568e8a (diff) | |
parent | 393bb2a565dc1e27812e1dd20747814892f80da2 (diff) | |
download | mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.bz2 mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'video/decode/videotoolbox.c')
-rw-r--r-- | video/decode/videotoolbox.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/video/decode/videotoolbox.c b/video/decode/videotoolbox.c index 2d2f5f735c..c69d5e89e6 100644 --- a/video/decode/videotoolbox.c +++ b/video/decode/videotoolbox.c @@ -27,11 +27,10 @@ #include "config.h" -static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info, +static int probe(struct lavc_ctx *ctx, struct vd_lavc_hwdec *hwdec, const char *codec) { - hwdec_request_api(info, "videotoolbox"); - if (!info || !info->hwctx || !info->hwctx->get_vt_fmt) + if (!hwdec_devices_load(ctx->hwdec_devs, HWDEC_VIDEOTOOLBOX)) return HWDEC_ERR_NO_CTX; switch (mp_codec_to_av_codec_id(codec)) { case AV_CODEC_ID_H264: @@ -89,8 +88,8 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h) AVVideotoolboxContext *vtctx = av_videotoolbox_alloc_context(); - struct mp_hwdec_ctx *hwctx = ctx->hwdec_info->hwctx; - vtctx->cv_pix_fmt_type = hwctx->get_vt_fmt(hwctx); + struct mp_vt_ctx *vt = hwdec_devices_load(ctx->hwdec_devs, HWDEC_VIDEOTOOLBOX); + vtctx->cv_pix_fmt_type = vt->get_vt_fmt(vt); int err = av_videotoolbox_default_init2(ctx->avctx, vtctx); if (err < 0) { |