summaryrefslogtreecommitdiff
path: root/libavcodec/vdpau.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-09-26 15:17:23 +0200
committerAnton Khirnov <anton@khirnov.net>2015-09-28 11:05:27 +0200
commita41e5e192ed8f79f6607f978dee3205580ba5039 (patch)
treed99b31b8157392d14f05b18e1d1acdeb4da3d76c /libavcodec/vdpau.c
parentcc8db760616a7ec3bd39b22ca45888c01326db13 (diff)
downloadffmpeg-a41e5e192ed8f79f6607f978dee3205580ba5039.tar.gz
vdpau: fix constrained baseline fallback
It appears vdpau drivers can return constrained baseline as unsupported, even if libvdpau knows about the symbol, and the main profile is supported. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/vdpau.c')
-rw-r--r--libavcodec/vdpau.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 8606624a85..77b649b9ff 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -173,8 +173,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
status = decoder_query_caps(vdctx->device, profile, &supported, &max_level,
&max_mb, &max_width, &max_height);
#ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE
- if (status != VDP_STATUS_OK && profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE) {
- /* Run-time backward compatibility for libvdpau 0.8 and earlier */
+ if ((status != VDP_STATUS_OK || supported != VDP_TRUE) && profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE) {
profile = VDP_DECODER_PROFILE_H264_MAIN;
status = decoder_query_caps(vdctx->device, profile, &supported,
&max_level, &max_mb,