[FFmpeg-cvslog] avcodec/nvenc: fix B-Ref-Mode support check for recent HEVC

Timo Rothenpieler git at videolan.org
Tue Jul 28 22:45:14 EEST 2020


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue Jul 28 21:44:11 2020 +0200| [466c14d10728cd315c60e602ffe3797e7dd0c3d3] | committer: Timo Rothenpieler

avcodec/nvenc: fix B-Ref-Mode support check for recent HEVC

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=466c14d10728cd315c60e602ffe3797e7dd0c3d3
---

 libavcodec/nvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index c6740c1842..8f5036b699 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -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) {



More information about the ffmpeg-cvslog mailing list