[FFmpeg-devel] [PATCH 3/4] avutil/cuda_check: propagate AVERROR_UNRECOVERABLE when needed

James Almer jamrial at gmail.com
Tue Nov 22 15:07:31 EET 2022


Based on a patch by Soft Works.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavutil/cuda_check.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/cuda_check.h b/libavutil/cuda_check.h
index f5a9234eaf..33aaf9c098 100644
--- a/libavutil/cuda_check.h
+++ b/libavutil/cuda_check.h
@@ -49,6 +49,10 @@ static inline int ff_cuda_check(void *avctx,
         av_log(avctx, AV_LOG_ERROR, " -> %s: %s", err_name, err_string);
     av_log(avctx, AV_LOG_ERROR, "\n");
 
+    // Not recoverable
+    if (err == CUDA_ERROR_UNKNOWN)
+        return AVERROR_UNRECOVERABLE;
+
     return AVERROR_EXTERNAL;
 }
 
-- 
2.38.1



More information about the ffmpeg-devel mailing list