aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-26 10:36:11 +0200
committerMax Kellermann <max@duempel.org>2014-08-26 10:52:17 +0200
commitf10d9996d25a224defdb2e474aef0b0a54438720 (patch)
treed04f35fc963f921d61570a5d3f322c366c775245 /src
parent58ec9d3a734541d6857a4bb82fc6579b83b63e87 (diff)
downloadmpd-f10d9996d25a224defdb2e474aef0b0a54438720.tar.gz
mpd-f10d9996d25a224defdb2e474aef0b0a54438720.tar.xz
mpd-f10d9996d25a224defdb2e474aef0b0a54438720.zip
decoder/mad: simplify if/else chain
Diffstat (limited to 'src')
-rw-r--r--src/decoder/plugins/MadDecoderPlugin.cxx38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/decoder/plugins/MadDecoderPlugin.cxx b/src/decoder/plugins/MadDecoderPlugin.cxx
index cc5468221..2b82b6221 100644
--- a/src/decoder/plugins/MadDecoderPlugin.cxx
+++ b/src/decoder/plugins/MadDecoderPlugin.cxx
@@ -432,17 +432,16 @@ MadDecoder::DecodeNextFrameHeader(Tag **tag)
return DECODE_CONT;
}
}
- if (MAD_RECOVERABLE(stream.error)) {
+
+ if (MAD_RECOVERABLE(stream.error))
return DECODE_SKIP;
- } else {
- if (stream.error == MAD_ERROR_BUFLEN)
- return DECODE_CONT;
- else {
- FormatWarning(mad_domain,
- "unrecoverable frame level error: %s",
- mad_stream_errorstr(&stream));
- return DECODE_BREAK;
- }
+ else if (stream.error == MAD_ERROR_BUFLEN)
+ return DECODE_CONT;
+ else {
+ FormatWarning(mad_domain,
+ "unrecoverable frame level error: %s",
+ mad_stream_errorstr(&stream));
+ return DECODE_BREAK;
}
}
@@ -479,17 +478,16 @@ MadDecoder::DecodeNextFrame()
return DECODE_CONT;
}
}
- if (MAD_RECOVERABLE(stream.error)) {
+
+ if (MAD_RECOVERABLE(stream.error))
return DECODE_SKIP;
- } else {
- if (stream.error == MAD_ERROR_BUFLEN)
- return DECODE_CONT;
- else {
- FormatWarning(mad_domain,
- "unrecoverable frame level error: %s",
- mad_stream_errorstr(&stream));
- return DECODE_BREAK;
- }
+ else if (stream.error == MAD_ERROR_BUFLEN)
+ return DECODE_CONT;
+ else {
+ FormatWarning(mad_domain,
+ "unrecoverable frame level error: %s",
+ mad_stream_errorstr(&stream));
+ return DECODE_BREAK;
}
}