[FFmpeg-cvslog] nvenc: Fix the preset mapping list

Ben Chang git at videolan.org
Wed Oct 4 05:04:35 EEST 2017


ffmpeg | branch: master | Ben Chang <benc at nvidia.com> | Fri Feb 24 14:39:21 2017 -0800| [d8f36a6aa33e9f904fa47caa0329ddaac391cd7d] | committer: Luca Barbato

nvenc: Fix the preset mapping list

The map is a sparse array and does not need a empty element to terminate
it.

The empty element is stored after the last one inserted in the list,
overwriting whichever element was next with zeros.

Bug-Id: 1029

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

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

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index ffa8a0a2d8..fcd496b93f 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -495,8 +495,7 @@ static int nvenc_map_preset(NVENCContext *ctx)
         PRESET(LOSSLESS_HP,         NVENC_LOSSLESS),
         PRESET_ALIAS(SLOW, HQ,      NVENC_TWO_PASSES),
         PRESET_ALIAS(MEDIUM, HQ,    NVENC_ONE_PASS),
-        PRESET_ALIAS(FAST, HP,      NVENC_ONE_PASS),
-        { { 0 } }
+        PRESET_ALIAS(FAST, HP,      NVENC_ONE_PASS)
     };
 
     GUIDTuple *t = &presets[ctx->preset];



More information about the ffmpeg-cvslog mailing list