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>
This commit is contained in:
wm4 2015-09-26 15:17:23 +02:00 committed by Anton Khirnov
parent cc8db76061
commit a41e5e192e
1 changed files with 1 additions and 2 deletions

View File

@ -173,8 +173,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
status = decoder_query_caps(vdctx->device, profile, &supported, &max_level, status = decoder_query_caps(vdctx->device, profile, &supported, &max_level,
&max_mb, &max_width, &max_height); &max_mb, &max_width, &max_height);
#ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE #ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE
if (status != VDP_STATUS_OK && profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE) { if ((status != VDP_STATUS_OK || supported != VDP_TRUE) && profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE) {
/* Run-time backward compatibility for libvdpau 0.8 and earlier */
profile = VDP_DECODER_PROFILE_H264_MAIN; profile = VDP_DECODER_PROFILE_H264_MAIN;
status = decoder_query_caps(vdctx->device, profile, &supported, status = decoder_query_caps(vdctx->device, profile, &supported,
&max_level, &max_mb, &max_level, &max_mb,