summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc_h264.c
diff options
context:
space:
mode:
authorMiroslav Slugeň <thunder.m@email.cz>2016-11-21 11:07:09 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2016-11-22 10:34:27 +0100
commitc4aca65a42eb674e7c1aab923f5c70c964fa79e7 (patch)
tree56cf789db65091c98187a9b59f0c50eba03a388a /libavcodec/nvenc_h264.c
parent8228b714be2575d1e08a590a8b27bc90f9fa4390 (diff)
downloadffmpeg-c4aca65a42eb674e7c1aab923f5c70c964fa79e7.tar.gz
avcodec/nvenc: maximum usable surfaces are limited to maximum registered frames
Maximum usable surfaces is limited to MAX_REGISTERED_FRAMES constant in nvenc.h Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/nvenc_h264.c')
-rw-r--r--libavcodec/nvenc_h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
index 6914046b8d..71e27fd110 100644
--- a/libavcodec/nvenc_h264.c
+++ b/libavcodec/nvenc_h264.c
@@ -80,7 +80,7 @@ static const AVOption options[] = {
{ "vbr_2pass", "Multi-pass variable bitrate mode", 0, AV_OPT_TYPE_CONST, { .i64 = NV_ENC_PARAMS_RC_2_PASS_VBR }, 0, 0, VE, "rc" },
{ "rc-lookahead", "Number of frames to look ahead for rate-control",
OFFSET(rc_lookahead), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE },
- { "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 32 }, 0, INT_MAX, VE },
+ { "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 32 }, 0, MAX_REGISTERED_FRAMES, VE },
{ "cbr", "Use cbr encoding mode", OFFSET(cbr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
{ "2pass", "Use 2pass encoding mode", OFFSET(twopass), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE },
{ "gpu", "Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on.",