summaryrefslogtreecommitdiff
path: root/src/libflac
diff options
context:
space:
mode:
Diffstat (limited to 'src/libflac')
-rw-r--r--src/libflac/decoder_flac.c4
-rw-r--r--src/libflac/demux_flac.c20
2 files changed, 14 insertions, 10 deletions
diff --git a/src/libflac/decoder_flac.c b/src/libflac/decoder_flac.c
index 8c7d39ad0..620c20455 100644
--- a/src/libflac/decoder_flac.c
+++ b/src/libflac/decoder_flac.c
@@ -337,7 +337,7 @@ static audio_decoder_t *
open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream) {
flac_decoder_t *this ;
- this = (flac_decoder_t *) malloc (sizeof (flac_decoder_t));
+ this = (flac_decoder_t *) xine_xmalloc (sizeof (flac_decoder_t));
this->audio_decoder.decode_data = flac_decode_data;
this->audio_decoder.reset = flac_reset;
@@ -389,7 +389,7 @@ static void *
init_plugin (xine_t *xine, void *data) {
flac_class_t *this;
- this = (flac_class_t *) malloc (sizeof (flac_class_t));
+ this = (flac_class_t *) xine_xmalloc (sizeof (flac_class_t));
this->decoder_class.open_plugin = open_plugin;
this->decoder_class.get_identifier = get_identifier;
diff --git a/src/libflac/demux_flac.c b/src/libflac/demux_flac.c
index 086f20fa9..4573b06b3 100644
--- a/src/libflac/demux_flac.c
+++ b/src/libflac/demux_flac.c
@@ -244,23 +244,27 @@ flac_error_callback (const FLAC__SeekableStreamDecoder *decoder,
FLAC__StreamDecoderErrorStatus status,
void *client_data)
{
+ demux_flac_t *this = (demux_flac_t *)client_data;
/* This will be called if there is an error when flac is seeking
* in the stream.
*/
- demux_flac_t *this = (demux_flac_t *)client_data;
- printf("demux_flac: flac_error_callback\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_flac: flac_error_callback\n");
+
if (status == FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC)
- printf("demux_flac: Decoder lost synchronization.\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_flac: Decoder lost synchronization.\n");
else if (status == FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER)
- printf("demux_flac: Decoder encounted a corrupted frame header.\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_flac: Decoder encounted a corrupted frame header.\n");
else if (status == FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH)
- printf("demux_flac: Frame's data did not match the CRC in the footer.\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_flac: Frame's data did not match the CRC in the footer.\n");
else
- printf("demux_flac: unknown error.\n");
-
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_flac: unknown error.\n");
+
this->status = DEMUX_FINISHED;
-
+
return;
}