mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 11:57:24 +08: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)) {
|
if ((retval == -1) && (errno == EINTR)) {
|
||||||
retval = 0; // pretend it was a timeout, keep looping.
|
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);
|
} while (retval == 0);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|||||||
Reference in New Issue
Block a user