[vlc-devel] [PATCH 3/8] nvdec: provide the needed picture pool size to the decoder owner

Steve Lhomme robux4 at ycbcr.xyz
Tue Jul 28 11:08:36 CEST 2020


The decoder has internal buffers with the DPB size that we don't see. At our
level we only need a few pictures to output for displaying/processing.
---
 modules/hw/nvdec/nvdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index 7fb0e8b4025..98b798309ef 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -440,7 +440,7 @@ static int CUDAAPI HandleVideoSequence(void *p_opaque, CUVIDEOFORMAT *p_format)
 
     CALL_CUDA_DEC(cuCtxPopCurrent, NULL);
 
-    ret = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out, 0);
+    ret = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out, MAX_POOL_SIZE);
     return (ret == VLC_SUCCESS);
 
 cuda_error:
@@ -1047,7 +1047,7 @@ static int OpenDecoder(vlc_object_t *p_this)
     for (chroma_idx = 0; output_chromas[chroma_idx] != 0; chroma_idx++)
     {
         p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma = output_chromas[chroma_idx];
-        result = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out, 0);
+        result = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out, MAX_POOL_SIZE);
         if (result == VLC_SUCCESS)
         {
             msg_Dbg(p_dec, "using chroma %4.4s", (char*)&p_dec->fmt_out.video.i_chroma);
-- 
2.26.2



More information about the vlc-devel mailing list