mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
Allow aborting on write error to stdout when -t 0 specified (#521)
* Allow aborting on write error to stdout when `-t 0` specified * Allow aborting on write error to stdout when `-t 0` specified in raspividyuv
This commit is contained in:
committed by
James Hughes
parent
3617b3f5c0
commit
20f03b4f39
@@ -2287,10 +2287,10 @@ static int wait_for_next_change(RASPIVID_STATE *state)
|
||||
|
||||
case WAIT_METHOD_FOREVER:
|
||||
{
|
||||
// We never return from this. Expect a ctrl-c to exit.
|
||||
while (1)
|
||||
// We never return from this. Expect a ctrl-c to exit or abort.
|
||||
while (!state->callback_data.abort)
|
||||
// Have a sleep so we don't hog the CPU.
|
||||
vcos_sleep(10000);
|
||||
vcos_sleep(ABORT_INTERVAL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1145,10 +1145,10 @@ static int wait_for_next_change(RASPIVIDYUV_STATE *state)
|
||||
|
||||
case WAIT_METHOD_FOREVER:
|
||||
{
|
||||
// We never return from this. Expect a ctrl-c to exit.
|
||||
while (1)
|
||||
// Have a sleep so we don't hog the CPU.
|
||||
vcos_sleep(10000);
|
||||
// We never return from this. Expect a ctrl-c to exit or abort.
|
||||
while (!state->callback_data.abort)
|
||||
// Have a sleep so we don't hog the CPU.
|
||||
vcos_sleep(ABORT_INTERVAL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user