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