summaryrefslogtreecommitdiff
path: root/apps/codecs/libmusepack/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libmusepack/internal.h')
-rw-r--r--apps/codecs/libmusepack/internal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/codecs/libmusepack/internal.h b/apps/codecs/libmusepack/internal.h
index 0f29060..3f8b29f 100644
--- a/apps/codecs/libmusepack/internal.h
+++ b/apps/codecs/libmusepack/internal.h
@@ -88,12 +88,12 @@ struct mpc_demux_t {
/**
* checks if a block key is valid
* @param key the two caracters key to check
- * @return MPC_STATUS_INVALIDSV if the key is invalid, MPC_STATUS_OK else
+ * @return MPC_STATUS_FAIL if the key is invalid, MPC_STATUS_OK else
*/
static mpc_inline mpc_status mpc_check_key(char * key)
{
if (key[0] < 65 || key[0] > 90 || key[1] < 65 || key[1] > 90)
- return MPC_STATUS_INVALIDSV;
+ return MPC_STATUS_FAIL;
return MPC_STATUS_OK;
}
@@ -114,6 +114,9 @@ void streaminfo_gain(mpc_streaminfo* si, const mpc_bits_reader * r_in);
// mpc_decoder.c
void mpc_decoder_reset_scf(mpc_decoder * d, int value);
+#define MPC_IS_FAILURE(X) ((int)(X) < (int)MPC_STATUS_OK)
+#define MPC_AUTO_FAIL(X) { mpc_status s = (X); if (MPC_IS_FAILURE(s)) return s; }
+
#ifdef __cplusplus
}
#endif