From e90a93eb4aeeea84cc43f71f760d870109996b36 Mon Sep 17 00:00:00 2001 From: Aryan Salmanpour Date: Tue, 30 Jan 2024 13:33:53 -0500 Subject: [PATCH] use the error code of VA_STATUS_ERROR_TIMEDOUT to avoid build failure with older va headers (#211) --- src/rocdecode/vaapi/vaapi_videodecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rocdecode/vaapi/vaapi_videodecoder.cpp b/src/rocdecode/vaapi/vaapi_videodecoder.cpp index e6fc4b5fd0..05e409d0ee 100644 --- a/src/rocdecode/vaapi/vaapi_videodecoder.cpp +++ b/src/rocdecode/vaapi/vaapi_videodecoder.cpp @@ -336,7 +336,7 @@ rocDecStatus VaapiVideoDecoder::ExportSurface(int pic_idx, VADRMPRIMESurfaceDesc * various reasons, we treat it as non-fatal and contiue waiting. */ if (va_status != VA_STATUS_SUCCESS) { - if (va_status == VA_STATUS_ERROR_TIMEDOUT) { + if (va_status == 0x26 /*VA_STATUS_ERROR_TIMEDOUT*/) { CHECK_VAAPI(vaQuerySurfaceStatus(va_display_, va_surface_ids_[pic_idx], &surface_status)); } else { std::cout << "VAAPI failure: vaSyncSurface() failed with error code: " << va_status << "', status: " << vaErrorStr(va_status) << "' at " << __FILE__ << ":" << __LINE__ << std::endl;