decoder: terminate decoder thread before MPD cleanup
When MPD exits, it should manually free all resources in use, to allow easy memory leak debugging. Make the decoder thread terminate during that.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user