Browse Source

avcodec/cuviddec: set ulMaxDisplayDelay to zero if low_delay flag is set

Zero is the recommended value in Nvidia coding samples for low latency use-cases.

Signed-off-by: Michal Novotny <michal.novotny@comprimato.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
tags/n4.4
Michal Novotny Timo Rothenpieler 4 years ago
parent
commit
b5d95998ff
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/cuviddec.c

+ 1
- 1
libavcodec/cuviddec.c View File

@@ -999,7 +999,7 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
}

ctx->cuparseinfo.ulMaxNumDecodeSurfaces = ctx->nb_surfaces;
ctx->cuparseinfo.ulMaxDisplayDelay = 4;
ctx->cuparseinfo.ulMaxDisplayDelay = (avctx->flags & AV_CODEC_FLAG_LOW_DELAY) ? 0 : 4;
ctx->cuparseinfo.pUserData = avctx;
ctx->cuparseinfo.pfnSequenceCallback = cuvid_handle_video_sequence;
ctx->cuparseinfo.pfnDecodePicture = cuvid_handle_picture_decode;


Loading…
Cancel
Save