mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Fixed bug #9672 - v4l2/camera prevent deadlock when there is a delay between SDL_ReleaseCameraFrame and SDL_CloseCamera
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user