This error constant was only added in the macOS 12 and iOS 15 SDKs. If building with an older SDK, assume that the error doesn't match this constant.
This fixes build errors with older SDKs after c6214b0d691566c7cb0f2ff5be08a24c3534e5bb. As this constant is declared unconditionally (without any target version guards) in the headers, one can't reproduce this issue while building with a newer SDK and targeting an older version with -mmacosx-version-min=. Technically, checking just one of MAC_OS_VERSION_12_0 and __IPHONE_15_0 is enough; the macOS SDKs and iOS SDKs share these files, so files from a similar point in time do have the same defines. Therefore, we don't really need to expand this with checks for tvOS, watchOS and other OS variants. --- libavcodec/videotoolbox.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index aaa6129576..7f7b910b26 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -728,8 +728,13 @@ static void videotoolbox_decoder_callback(void *opaque, } if (!image_buffer) { +#if defined(MAC_OS_VERSION_12_0) || defined(__IPHONE_15_0) + // kVTVideoDecoderReferenceMissingErr was defined in the macOS 12/iOS 15 SDK if (status != kVTVideoDecoderReferenceMissingErr) vtctx->reconfig_needed = true; +#else + vtctx->reconfig_needed = true; +#endif av_log(vtctx->logctx, status ? AV_LOG_WARNING : AV_LOG_DEBUG, "vt decoder cb: output image buffer is null: %i, reconfig %d\n", -- 2.39.5 (Apple Git-154) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".