mirror of https://github.com/libsdl-org/SDL
Fixed bug #9672 - v4l2/camera prevent deadlock when there is a delay between SDL_ReleaseCameraFrame and SDL_CloseCamera
This commit is contained in:
parent
d4ce9183b8
commit
7b252634fd
|
@ -107,6 +107,12 @@ static int V4L2_WaitDevice(SDL_CameraDevice *device)
|
|||
if ((retval == -1) && (errno == EINTR)) {
|
||||
retval = 0; // pretend it was a timeout, keep looping.
|
||||
}
|
||||
|
||||
// Thread is requested to shut down
|
||||
if (SDL_AtomicGet(&device->shutdown)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
} while (retval == 0);
|
||||
|
||||
return retval;
|
||||
|
|
Loading…
Reference in New Issue