[FFmpeg-devel] [PATCH] set ulMaxDisplayDelay cuvidec parser option to zero if low_delay flag is on

Timo Rothenpieler timo at rothenpieler.org
Sat Feb 20 01:29:23 EET 2021


On 19.02.2021 23:33, clime wrote:
>       ctx->cuparseinfo.ulMaxNumDecodeSurfaces = ctx->nb_surfaces;
> -    ctx->cuparseinfo.ulMaxDisplayDelay = 4;
> +    ctx->cuparseinfo.ulMaxDisplayDelay = avctx->flags & AV_CODEC_FLAG_LOW_DELAY ? 0 : 4;

I'd prefer this with proper braces, to make sure no compiler gets the 
crazy idea to evaluate this as avctx->flags & 4.

Otherwise this is probably fine, but will severely gimp the performance, 
to the point that it might not even be able to sustain 60 FPS anymore.
Printing a warning might be in order.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4494 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210220/d24ca7a7/attachment.bin>


More information about the ffmpeg-devel mailing list