diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-15 00:22:19 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-15 00:23:53 +0300 |
commit | 27f2e211aa6d0f9b5b4e4c04d3a3567423085d49 (patch) | |
tree | c0ec7ce6076e8ecf338c1c67d738deac2aee55f9 | |
parent | 3f679f73a2eee1937bd58e6ec5739d29b1a05e7f (diff) | |
parent | 559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816 (diff) |
Merge commit '559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816'
* commit '559fa0d41b5cf8f7e1ba89d1ac70e74712eb2816':
vdpau: add mapping for H.264 Constrained Baseline profile and fallback
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/vdpau.c | 9 | ||||
-rw-r--r-- | libavcodec/vdpau_h264.c | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 33be4bed34..ea239bb311 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -138,6 +138,15 @@ 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 */ + profile = VDP_DECODER_PROFILE_H264_MAIN; + status = decoder_query_caps(vdctx->device, profile, &supported, + &max_level, &max_mb, + &max_width, &max_height); + } +#endif if (status != VDP_STATUS_OK) return vdpau_error(status); diff --git a/libavcodec/vdpau_h264.c b/libavcodec/vdpau_h264.c index d9a3a52df0..0b2c0466b4 100644 --- a/libavcodec/vdpau_h264.c +++ b/libavcodec/vdpau_h264.c @@ -213,6 +213,10 @@ static int vdpau_h264_init(AVCodecContext *avctx) profile = VDP_DECODER_PROFILE_H264_BASELINE; break; case FF_PROFILE_H264_CONSTRAINED_BASELINE: +#ifdef VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE + profile = VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE; + break; +#endif case FF_PROFILE_H264_MAIN: profile = VDP_DECODER_PROFILE_H264_MAIN; break; |