summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2015-06-26 08:43:41 -0700
committerPhilip Langdale <philipl@overt.org>2015-06-26 19:07:51 -0700
commitb69bea3ab8f83b4cac7091d648d27c3be3efbc28 (patch)
tree6a78d8af64aaaaa5ce793944e20efe91a36faad8 /libavcodec/utils.c
parent7728d231a6cb5c31bf59a29ccc89193c82389e01 (diff)
avcodec: Add flag for experimental HWAccels and use it for VDPAU/HEVC
This HWAccel isn't really usable right now due to an nvidia driver bug, so we don't want it selected by default. HWAccels have a capabilities field and there's a comment about flags, but no flags exist today, so let's add one for experimental hwaccels.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7696582aff..40ea5440b8 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1176,6 +1176,13 @@ static int setup_hwaccel(AVCodecContext *avctx,
return AVERROR(ENOENT);
}
+ if (hwa->capabilities & HWACCEL_CODEC_CAP_EXPERIMENTAL &&
+ avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
+ av_log(avctx, AV_LOG_WARNING, "Ignoring experimental hwaccel: %s\n",
+ hwa->name);
+ return AVERROR(ENOTSUP);
+ }
+
if (hwa->priv_data_size) {
avctx->internal->hwaccel_priv_data = av_mallocz(hwa->priv_data_size);
if (!avctx->internal->hwaccel_priv_data)