diff options
Diffstat (limited to '')
-rw-r--r-- | src/decoder_thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c index 0ae1a88f9..2be0937da 100644 --- a/src/decoder_thread.c +++ b/src/decoder_thread.c @@ -204,7 +204,7 @@ static void decoder_run(void) static void * decoder_task(G_GNUC_UNUSED void *arg) { - while (1) { + do { assert(dc.state == DECODE_STATE_STOP || dc.state == DECODE_STATE_ERROR); @@ -226,7 +226,7 @@ static void * decoder_task(G_GNUC_UNUSED void *arg) notify_wait(&dc.notify); break; } - } + } while (dc.command != DECODE_COMMAND_NONE || !dc.quit); return NULL; } |