SWDEV-366974 - add proper error

- Null stream correct error when blocing stream is being captured

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I0d902a4f4ef02736a6db60ba7bffa7c20011bc84
This commit is contained in:
sdashmiz
2022-11-11 11:41:00 -05:00
committed by Shadi Dashmiz
parent 5f4aa2e994
commit c5e7b56463
3 changed files with 16 additions and 0 deletions
+10
View File
@@ -180,6 +180,16 @@ void Stream::syncNonBlockingStreams(int deviceId) {
}
}
bool Stream::StreamCaptureBlocking() {
amd::ScopedLock lock(streamSetLock);
for (auto& it : streamSet) {
if (it->GetCaptureStatus() == hipStreamCaptureStatusActive && it->Flags() != hipStreamNonBlocking) {
return true;
}
}
return false;
}
void Stream::destroyAllStreams(int deviceId) {
std::vector<Stream*> toBeDeleted;
{