decoder/mad: simplify if/else chain
This commit is contained in:
parent
58ec9d3a73
commit
f10d9996d2
@ -432,17 +432,16 @@ MadDecoder::DecodeNextFrameHeader(Tag **tag)
|
|||||||
return DECODE_CONT;
|
return DECODE_CONT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MAD_RECOVERABLE(stream.error)) {
|
|
||||||
|
if (MAD_RECOVERABLE(stream.error))
|
||||||
return DECODE_SKIP;
|
return DECODE_SKIP;
|
||||||
} else {
|
else if (stream.error == MAD_ERROR_BUFLEN)
|
||||||
if (stream.error == MAD_ERROR_BUFLEN)
|
return DECODE_CONT;
|
||||||
return DECODE_CONT;
|
else {
|
||||||
else {
|
FormatWarning(mad_domain,
|
||||||
FormatWarning(mad_domain,
|
"unrecoverable frame level error: %s",
|
||||||
"unrecoverable frame level error: %s",
|
mad_stream_errorstr(&stream));
|
||||||
mad_stream_errorstr(&stream));
|
return DECODE_BREAK;
|
||||||
return DECODE_BREAK;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -479,17 +478,16 @@ MadDecoder::DecodeNextFrame()
|
|||||||
return DECODE_CONT;
|
return DECODE_CONT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MAD_RECOVERABLE(stream.error)) {
|
|
||||||
|
if (MAD_RECOVERABLE(stream.error))
|
||||||
return DECODE_SKIP;
|
return DECODE_SKIP;
|
||||||
} else {
|
else if (stream.error == MAD_ERROR_BUFLEN)
|
||||||
if (stream.error == MAD_ERROR_BUFLEN)
|
return DECODE_CONT;
|
||||||
return DECODE_CONT;
|
else {
|
||||||
else {
|
FormatWarning(mad_domain,
|
||||||
FormatWarning(mad_domain,
|
"unrecoverable frame level error: %s",
|
||||||
"unrecoverable frame level error: %s",
|
mad_stream_errorstr(&stream));
|
||||||
mad_stream_errorstr(&stream));
|
return DECODE_BREAK;
|
||||||
return DECODE_BREAK;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user