summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-03-27 20:46:11 +0100
committerMark Thompson <sw@jkqxz.net>2017-04-26 22:58:19 +0100
commit7acb90333a187b0e847b66f9d3511245423dc0ce (patch)
treecd3c1a1c0d3ee4a2230650c2cac91706d587d36d /libavcodec
parent64a5260c695dd8051509d3270295fd64eac56587 (diff)
downloadffmpeg-streaming-7acb90333a187b0e847b66f9d3511245423dc0ce.zip
ffmpeg-streaming-7acb90333a187b0e847b66f9d3511245423dc0ce.tar.gz
vaapi: Add external control of allow-profile-mismatch
Uses the just-added ALLOW_PROFILE_MISMATCH flag.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vaapi_decode.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index 0db79d4..a63c4c6 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -283,14 +283,6 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
int profile_count, exact_match, alt_profile;
const AVPixFmtDescriptor *sw_desc, *desc;
- // Allowing a profile mismatch can be useful because streams may
- // over-declare their required capabilities - in particular, many
- // H.264 baseline profile streams (notably some of those in FATE)
- // only use the feature set of constrained baseline. This flag
- // would have to be be set by some external means in order to
- // actually be useful. (AV_HWACCEL_FLAG_IGNORE_PROFILE?)
- int allow_profile_mismatch = 0;
-
codec_desc = avcodec_descriptor_get(avctx->codec_id);
if (!codec_desc) {
err = AVERROR(EINVAL);
@@ -346,7 +338,8 @@ static int vaapi_decode_make_config(AVCodecContext *avctx)
goto fail;
}
if (!exact_match) {
- if (allow_profile_mismatch) {
+ if (avctx->hwaccel_flags &
+ AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH) {
av_log(avctx, AV_LOG_VERBOSE, "Codec %s profile %d not "
"supported for hardware decode.\n",
codec_desc->name, avctx->profile);
OpenPOWER on IntegriCloud