PR #23470 opened by Felix-Gong
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23470
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23470.patch

SDK 13.1 renamed `countingType` to `countingTypeLSB` in 
`NV_ENC_CLOCK_TIMESTAMP_SET`, causing a build failure with newer SDK versions.

Use `NVENCAPI_CHECK_VERSION` to select the correct field name.

This issue was discovered when the Fate (Full, wine) CI failed on PR #23140 
(RISC-V swresample optimization).


>From 40dcb1dc21740b440fd5a7217f9c08aa6d32c80a Mon Sep 17 00:00:00 2001
From: Felix Gong <[email protected]>
Date: Sat, 13 Jun 2026 14:13:44 +0000
Subject: [PATCH] avcodec/nvenc: fix build with NVENC SDK 13.1

SDK 13.1 renamed countingType to countingTypeLSB in
NV_ENC_CLOCK_TIMESTAMP_SET. Use NVENCAPI_CHECK_VERSION
to select the correct field name.
---
 libavcodec/nvenc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index a8dac1ebd3..3da13fb332 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -2528,7 +2528,11 @@ static void nvenc_fill_time_code(AVCodecContext *avctx, 
const AVFrame *frame, NV
             unsigned hh, mm, ss, ff, drop;
             ff_timecode_set_smpte(&drop, &hh, &mm, &ss, &ff, avctx->framerate, 
tc[i + 1], 0, 0);
 
+#if NVENCAPI_CHECK_VERSION(13, 1)
+            time_code->clockTimestamp[i].countingTypeLSB = 0;
+#else
             time_code->clockTimestamp[i].countingType = 0;
+#endif
             time_code->clockTimestamp[i].discontinuityFlag = 0;
             time_code->clockTimestamp[i].cntDroppedFrames = drop;
             time_code->clockTimestamp[i].nFrames = ff;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to