don't call quitDecode() in waitOnDecode()
To make the code more consistent, call quitDecode() only at the end of decodeParent().
This commit is contained in:
parent
e8bd9ddc9f
commit
a68ef497f5
@ -71,7 +71,6 @@ static int waitOnDecode(int *decodeWaitedOn)
|
|||||||
if (dc.error != DECODE_ERROR_NOERROR) {
|
if (dc.error != DECODE_ERROR_NOERROR) {
|
||||||
pc.errored_song = dc.next_song;
|
pc.errored_song = dc.next_song;
|
||||||
pc.error = PLAYER_ERROR_FILE;
|
pc.error = PLAYER_ERROR_FILE;
|
||||||
quitDecode();
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,8 +210,10 @@ static void decodeParent(void)
|
|||||||
|
|
||||||
ob_set_lazy(0);
|
ob_set_lazy(0);
|
||||||
|
|
||||||
if (waitOnDecode(&decodeWaitedOn) < 0)
|
if (waitOnDecode(&decodeWaitedOn) < 0) {
|
||||||
|
quitDecode();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pc.elapsedTime = 0;
|
pc.elapsedTime = 0;
|
||||||
pc.state = PLAYER_STATE_PLAY;
|
pc.state = PLAYER_STATE_PLAY;
|
||||||
|
Loading…
Reference in New Issue
Block a user