You need to sign in or sign up before continuing.
Unverified Commit 7dfd8dc8 authored by Ștefan Săftescu's avatar Ștefan Săftescu Committed by GitHub
Browse files

Replace hardcoded error code with ENODATA (#3277)



The video reader suppressed code 61 (ENODATA on Linux) that occured at
the end of a stream and logged an INFO message. On macOS ENODATA has a
different code (96), which resulted in an error message being logged.

This small patch replaces the hard-coded value with the ENODATA constant
to suppress the macOS warning.
Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
parent 89bc3079
......@@ -311,8 +311,8 @@ std::tuple<torch::Tensor, double> Video::Next() {
// currently not supporting other formats (will do soon)
out.payload.reset();
} else if (res == 61) {
LOG(INFO) << "Decoder ran out of frames (error 61)\n";
} else if (res == ENODATA) {
LOG(INFO) << "Decoder ran out of frames (ENODATA)\n";
} else {
LOG(ERROR) << "Decoder failed with ERROR_CODE " << res;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment