aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-02-11 12:26:45 +0100
committerMax Kellermann <max@duempel.org>2012-02-11 12:37:24 +0100
commita4cbaafd10d0ab0e0b6dc78a2f4444f08f546627 (patch)
tree5b7da040ca2bfdc9c53a9463ca40f36f0879b722 /src/decoder/_flac_common.c
parentc5f2cdb82202d86ab2cda4d7f02732cb9fbffd2a (diff)
downloadmpd-a4cbaafd10d0ab0e0b6dc78a2f4444f08f546627.tar.gz
mpd-a4cbaafd10d0ab0e0b6dc78a2f4444f08f546627.tar.xz
mpd-a4cbaafd10d0ab0e0b6dc78a2f4444f08f546627.zip
decoder/flac: use error messages from libFLAC
Diffstat (limited to '')
-rw-r--r--src/decoder/_flac_common.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c
index fc42e5913..bab3995f0 100644
--- a/src/decoder/_flac_common.c
+++ b/src/decoder/_flac_common.c
@@ -139,26 +139,13 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block,
}
}
-void flac_error_common_cb(const char *plugin,
- const FLAC__StreamDecoderErrorStatus status,
+void flac_error_common_cb(const FLAC__StreamDecoderErrorStatus status,
struct flac_data *data)
{
if (decoder_get_command(data->decoder) == DECODE_COMMAND_STOP)
return;
- switch (status) {
- case FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC:
- g_warning("%s lost sync\n", plugin);
- break;
- case FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER:
- g_warning("bad %s header\n", plugin);
- break;
- case FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH:
- g_warning("%s crc mismatch\n", plugin);
- break;
- default:
- g_warning("unknown %s error\n", plugin);
- }
+ g_warning("%s", FLAC__StreamDecoderErrorStatusString[status]);
}
/**