aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:14:14 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:14:14 +0000
commit00a16b49ba22d8a5749dc23eec7a9d0e454f0d24 (patch)
tree1bb0bdfc7a0a5aff7a49080b0d59a9a7fbf11b06 /src/decode.c
parent646260b19e2084bb3d81986929cc8fa0291068e5 (diff)
downloadmpd-00a16b49ba22d8a5749dc23eec7a9d0e454f0d24.tar.gz
mpd-00a16b49ba22d8a5749dc23eec7a9d0e454f0d24.tar.xz
mpd-00a16b49ba22d8a5749dc23eec7a9d0e454f0d24.zip
use break instead of quitDecode()+return
The code paths which return from the functions all have to call quitDecode(). If we simply break instead of calling quitDecode() explicitly, this function gets called in the last line of this function anyway. git-svn-id: https://svn.musicpd.org/mpd/trunk@7278 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/decode.c b/src/decode.c
index 495251a09..06c054e3b 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -427,8 +427,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
&decodeWaitedOn, &next);
if (pc->stop) {
dropBufferedAudio();
- quitDecode(pc,dc);
- return;
+ break;
}
if (buffering) {
@@ -453,8 +452,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
ERROR("problems opening audio device "
"while playing \"%s\"\n",
get_song_url(tmp, pc->current_song));
- quitDecode(pc,dc);
- return;
+ break;
} else {
player_wakeup_decoder();
}
@@ -472,8 +470,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
/* the decoder failed */
pc->errored_song = pc->current_song;
pc->error = PLAYER_ERROR_FILE;
- quitDecode(pc,dc);
- return;
+ break;
}
else {
/* the decoder is not yet ready; wait