aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-06-06 21:19:29 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-06-06 23:52:55 +0200
commit808356c61c6ed05467d4351b12dd34938705cd65 (patch)
treef98cb55c1f0c829177b595f670d3be46ed042b24
parenta5eb70ad9569c62158b4b2d18f2143db791f7d27 (diff)
downloadffmpeg-808356c61c6ed05467d4351b12dd34938705cd65.tar.gz
avcodec/nvenc: Check capabilities for interlaced encoding
-rw-r--r--libavcodec/nvenc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index d3115f4141..ae1612ff2a 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -306,6 +306,14 @@ static int nvenc_check_capabilities(AVCodecContext *avctx)
return AVERROR(ENOSYS);
}
+ ret = nvenc_check_cap(avctx, NV_ENC_CAPS_SUPPORT_FIELD_ENCODING);
+ if (ret < 1 && avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) {
+ av_log(avctx, AV_LOG_VERBOSE,
+ "Interlaced encoding is not supported. Supported level: %d\n",
+ ret);
+ return AVERROR(ENOSYS);
+ }
+
return 0;
}