diff options
author | wm4 <wm4@nowhere> | 2017-07-04 14:58:34 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-07-04 14:58:34 +0200 |
commit | e76d56d57bb0382cc33bdf0a4c2eaa08b3c315c4 (patch) | |
tree | 9736a3219c3db6130c63e0c1bdc71e663502e63b /video/decode/vd_lavc.c | |
parent | bd356333c71352e44c89757ee65637448fcb2757 (diff) | |
download | mpv-e76d56d57bb0382cc33bdf0a4c2eaa08b3c315c4.tar.bz2 mpv-e76d56d57bb0382cc33bdf0a4c2eaa08b3c315c4.tar.xz |
vd_lavc: make --vd-lavc-check-hw-profile=no work for generic hwaccels
This sets AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH, which some hwaccels
using the new generic API respect. These do profile selection in
libavcodec, so it can be controlled only with an external flag, instead
of in mpv code like it used to be done.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index a36adbf334..b7ab23f89d 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -600,9 +600,13 @@ static void init_avctx(struct dec_video *vd, const char *decoder, if (ctx->hwdec) { avctx->opaque = vd; avctx->thread_count = 1; -#if HAVE_VDPAU_HWACCEL +#ifdef AV_HWACCEL_FLAG_IGNORE_LEVEL avctx->hwaccel_flags |= AV_HWACCEL_FLAG_IGNORE_LEVEL; #endif +#ifdef AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH + if (!lavc_param->check_hw_profile) + avctx->hwaccel_flags |= AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH; +#endif if (ctx->hwdec->image_format) avctx->get_format = get_format_hwdec; if (ctx->hwdec->allocate_image) |