<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
With some broken h264/h265 files when decoding with NVIDIA cuvid sometimes the decoder fails, in a few cases the error is fatal for the decoding process and I can fallback to the software decoding (that is far more robust, but since I'm going to re-encode with
 nvenc I cannot keep as default), but there are a few files that causes error like this:<br>
<br>
Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: Error while decoding stream #0:0: Generic error in an external library
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: [h264_cuvid @ 0x7f8c4a4d8f40] cuvid decode callback error</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: Error while decoding stream #0:0: Generic error in an external library</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: [h264_cuvid @ 0x7f8c4a4d8f40] cuvid decode callback error</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: Error while decoding stream #0:0: Generic error in an external library</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: [h264_cuvid @ 0x7f8c4a4d8f40] cuvid decode callback error</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: Error while decoding stream #0:0: Generic error in an external library</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: [h264_cuvid @ 0x7f8c4a4d8f40] cuvid decode callback error</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: Error while decoding stream #0:0: Generic error in an external library</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: [h264_cuvid @ 0x7f8c4a4d8f40] cuvid decode callback error</div>
<div>Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: Error while decoding stream #0:0: Generic error in an external library</div>
Sep  1 15:44:33 ip-172-31-52-212 upworker[1890]: [h264_cuvid @ 0x7f8c4a4d8f40] cuvid decode callback error<br>
[...]<br>
<br>
... that are not "fatal", so the decoder continue to run without decoding a single frame until it fills the disk of the machine with the syslog file.<br>
<br>
I'd like a way to make this error fatal, is there an API to do so?<br>
<br>
My failback solution, if there is no way to achive this is to modify the log callback hook to stop the encoding process if the error is "cuvid decode callback error" but I'd like a cleaner approach!<br>
<br>
Thanks in advance,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
 Gabriele Greco<br>
</div>
</body>
</html>