diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 12:30:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 12:30:07 +0200 |
commit | 51c810e62b63a1451b337b1cba0141b386066668 (patch) | |
tree | 1b5d4697495201e68400608a0bb9fc1ba738ebb8 /libavcodec/vdpau.c | |
parent | fd937866f7b7ae3303e8a78b1e9a48d853360d62 (diff) | |
parent | d565fef1b83b6c5f8afb32229260b79f67c68109 (diff) | |
download | ffmpeg-51c810e62b63a1451b337b1cba0141b386066668.tar.gz |
Merge commit 'd565fef1b83b6c5f8afb32229260b79f67c68109'
* commit 'd565fef1b83b6c5f8afb32229260b79f67c68109':
vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level check
Conflicts:
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vdpau.c')
-rw-r--r-- | libavcodec/vdpau.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index c3a5ca00fd..41aea1c215 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -107,7 +107,9 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, vdctx->device = hwctx->device; vdctx->get_proc_address = hwctx->get_proc_address; - if (level < 0) + if (hwctx->flags & AV_HWACCEL_FLAG_IGNORE_LEVEL) + level = 0; + else if (level < 0) return AVERROR(ENOTSUP); status = vdctx->get_proc_address(vdctx->device, @@ -686,7 +688,7 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, { VDPAUHWContext *hwctx; - if (flags != 0) + if (flags & ~AV_HWACCEL_FLAG_IGNORE_LEVEL) return AVERROR(EINVAL); if (av_reallocp(&avctx->hwaccel_context, sizeof(*hwctx))) @@ -698,6 +700,7 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, hwctx->context.decoder = VDP_INVALID_HANDLE; hwctx->device = device; hwctx->get_proc_address = get_proc; + hwctx->flags = flags; hwctx->reset = 1; return 0; } |