1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

Fixes compilation when using API headers older than 12.0

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-02-04 10:30:34 -03:00
parent 4307008b9a
commit 873204e6e4
2 changed files with 7 additions and 0 deletions

View File

@ -1462,7 +1462,9 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
hevc->intraRefreshPeriod = cc->gopLength;
hevc->intraRefreshCnt = cc->gopLength - 1;
cc->gopLength = NVENC_INFINITE_GOPLENGTH;
#ifdef NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI
hevc->outputRecoveryPointSEI = 1;
#endif
#ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh;
#endif

View File

@ -78,6 +78,11 @@ typedef void ID3D11Device;
#define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH
#endif
// SDK 12.0 compile time feature checks
#if NVENCAPI_CHECK_VERSION(12, 0)
#define NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI
#endif
// SDK 12.1 compile time feature checks
#if NVENCAPI_CHECK_VERSION(12, 1)
#define NVENC_NO_DEPRECATED_RC