mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-19 05:53:42 +00:00
issue #230: processing any freshest valid buffer
This commit is contained in:
@@ -366,18 +366,15 @@ int us_device_grab_buffer(us_device_s *dev, us_hw_buffer_s **hw) {
|
|||||||
buf_got = true;
|
buf_got = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if(errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
if(broken) {
|
if (buf_got) {
|
||||||
return -2;
|
break; // Process any latest valid frame
|
||||||
} else if(buf_got) {
|
} else if (broken) {
|
||||||
break;
|
return -2; // If we have only broken frames on this capture session
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
US_LOG_PERROR("Can't grab device buffer");
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
US_LOG_PERROR("Can't grab device buffer");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
} while (true);
|
} while (true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user