Fixes compilation when using API headers older than 12.0
Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -1462,7 +1462,9 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx) · 1461 unmodified lines | ||
| 1462 | 1462 | hevc->intraRefreshPeriod = cc->gopLength; |
| 1463 | 1463 | hevc->intraRefreshCnt = cc->gopLength - 1; |
| 1464 | 1464 | cc->gopLength = NVENC_INFINITE_GOPLENGTH; |
| 1465 | +#ifdef NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI | |
| 1465 | 1466 | hevc->outputRecoveryPointSEI = 1; |
| 1467 | +#endif | |
| 1466 | 1468 | #ifdef NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH |
| 1467 | 1469 | hevc->singleSliceIntraRefresh = ctx->single_slice_intra_refresh; |
| 1468 | 1470 | #endif |
| @@ -78,6 +78,11 @@ typedef void ID3D11Device; · 77 unmodified lines | ||
| 78 | 78 | #define NVENC_HAVE_SINGLE_SLICE_INTRA_REFRESH |
| 79 | 79 | #endif |
| 80 | 80 | |
| 81 | +// SDK 12.0 compile time feature checks | |
| 82 | +#if NVENCAPI_CHECK_VERSION(12, 0) | |
| 83 | +#define NVENC_HAVE_HEVC_OUTPUT_RECOVERY_POINT_SEI | |
| 84 | +#endif | |
| 85 | + | |
| 81 | 86 | // SDK 12.1 compile time feature checks |
| 82 | 87 | #if NVENCAPI_CHECK_VERSION(12, 1) |
| 83 | 88 | #define NVENC_NO_DEPRECATED_RC |