summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorhargut <harald.gutmann@gmx.net>2017-01-02 17:28:20 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-01-02 17:28:20 +0100
commite2043cf5a4cb60ed80652257f31099e1773e0482 (patch)
tree2cd92fcf2a1090719f90ea03b8e8867e1b32a16f /modules
parentec25f5e12f2d6102eac2adffb63237452136a6e8 (diff)
prepare nvenc_h264 code for ffmpeg >= 3.2.x (#197)
* prepare nvenc_h264 code for ffmpeg >= 3.2.x * fix line length * fix line length again ;)
Diffstat (limited to 'modules')
-rw-r--r--modules/avcodec/encode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/avcodec/encode.c b/modules/avcodec/encode.c
index 03084ac..3f9f11d 100644
--- a/modules/avcodec/encode.c
+++ b/modules/avcodec/encode.c
@@ -220,29 +220,30 @@ static int open_encoder(struct videnc_state *st,
st->ctx->max_qdiff = 4;
#ifndef USE_X264
- if (st->codec == avcodec_find_encoder_by_name("nvenc_h264")) {
+ if (st->codec == avcodec_find_encoder_by_name("nvenc_h264") ||
+ st->codec == avcodec_find_encoder_by_name("h264_nvenc")) {
#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(21<<8)+0)
err = av_opt_set(st->ctx->priv_data,
"preset", "llhp", 0);
if (err < 0) {
- debug("avcodec: nvenc_h264 setting preset "
+ debug("avcodec: h264 nvenc setting preset "
"\"llhp\" failed; error: %u\n", err);
}
else {
- debug("avcodec: nvenc_h264 preset "
+ debug("avcodec: h264 nvenc preset "
"\"llhp\" selected\n");
}
err = av_opt_set_int(st->ctx->priv_data,
"2pass", 1, 0);
if (err < 0) {
- debug("avcodec: nvenc_h264 option "
+ debug("avcodec: h264 nvenc option "
"\"2pass\" failed; error: %u\n", err);
}
else {
- debug("avcodec: nvenc_h264 option "
+ debug("avcodec: h264 nvenc option "
"\"2pass\" selected\n");
}
#endif