]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/nvenc: fix B-Ref-Mode support check for recent HEVC
authorTimo Rothenpieler <timo@rothenpieler.org>
Tue, 28 Jul 2020 19:44:11 +0000 (21:44 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Tue, 28 Jul 2020 19:44:11 +0000 (21:44 +0200)
libavcodec/nvenc.c

index c6740c18429d9305817618d7e098e03f5b597a34..8f5036b699e1c0207eff012078accda602c3ab63 100644 (file)
@@ -424,7 +424,7 @@ static int nvenc_check_capabilities(AVCodecContext *avctx)
 
 #ifdef NVENC_HAVE_BFRAME_REF_MODE
     ret = nvenc_check_cap(avctx, NV_ENC_CAPS_SUPPORT_BFRAME_REF_MODE);
-    if (ctx->b_ref_mode == NV_ENC_BFRAME_REF_MODE_EACH && ret != 1) {
+    if (ctx->b_ref_mode == NV_ENC_BFRAME_REF_MODE_EACH && ret != 1 && ret != 3) {
         av_log(avctx, AV_LOG_WARNING, "Each B frame as reference is not supported\n");
         return AVERROR(ENOSYS);
     } else if (ctx->b_ref_mode != NV_ENC_BFRAME_REF_MODE_DISABLED && ret == 0) {