diff options
author | wm4 <wm4@nowhere> | 2017-05-24 15:07:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-05-24 15:25:48 +0200 |
commit | 83a9b0bc4840c1bb203c23194c5f07f898999034 (patch) | |
tree | 0b7047c9623e8da03b31929c84febf69abe64bed /video/decode/vd_lavc.c | |
parent | 2426f95e0fc232b01228457e5116b592c56b1f7f (diff) | |
download | mpv-83a9b0bc4840c1bb203c23194c5f07f898999034.tar.bz2 mpv-83a9b0bc4840c1bb203c23194c5f07f898999034.tar.xz |
videotoolbox: support new libavcodec API
The new API has literally no advantages (other than that we can drop
mp_vt_download_image and other things later), but it's sort-of uniform
with the other hwaccels.
"--videotoolbox-format=no" is not supported with the new API, because it
doesn't "fit in". Probably could be added later again.
The iOS code change is untested (no way to test).
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 2e7d84e55b..6dda6302f3 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -819,6 +819,9 @@ static int init_generic_hwaccel(struct dec_video *vd) } } + if (hwdec->image_format == IMGFMT_VIDEOTOOLBOX) + av_sw_format = imgfmt2pixfmt(vd->opts->videotoolbox_format); + if (av_sw_format == AV_PIX_FMT_NONE) { MP_VERBOSE(ctx, "Unsupported hw decoding format: %s\n", mp_imgfmt_to_name(pixfmt2imgfmt(ctx->avctx->sw_pix_fmt))); |