diff options
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/aac_plugin.c | 2 | ||||
-rw-r--r-- | src/inputPlugins/mod_plugin.c | 6 | ||||
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 6 | ||||
-rw-r--r-- | src/inputPlugins/mp4_plugin.c | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c index 3213bb68f..07906152c 100644 --- a/src/inputPlugins/aac_plugin.c +++ b/src/inputPlugins/aac_plugin.c @@ -162,7 +162,7 @@ static void initAacBuffer(InputStream * inStream, AacBuffer * b, float *length, fileread = inStream->size; - b->buffer = malloc(FAAD_MIN_STREAMSIZE * AAC_MAX_CHANNELS); + b->buffer = xmalloc(FAAD_MIN_STREAMSIZE * AAC_MAX_CHANNELS); memset(b->buffer, 0, FAAD_MIN_STREAMSIZE * AAC_MAX_CHANNELS); bread = readFromInputStream(inStream, b->buffer, 1, diff --git a/src/inputPlugins/mod_plugin.c b/src/inputPlugins/mod_plugin.c index 31d7b20de..a73c267be 100644 --- a/src/inputPlugins/mod_plugin.c +++ b/src/inputPlugins/mod_plugin.c @@ -143,9 +143,9 @@ static mod_Data *mod_open(char *path) if (!(moduleHandle = Player_Load(path, 128, 0))) return NULL; - data = malloc(sizeof(mod_Data)); + data = xmalloc(sizeof(mod_Data)); - data->audio_buffer = malloc(MIKMOD_FRAME_SIZE); + data->audio_buffer = xmalloc(MIKMOD_FRAME_SIZE); data->moduleHandle = moduleHandle; Player_Start(data->moduleHandle); @@ -243,7 +243,7 @@ static MpdTag *modTagDup(char *file) ret = newMpdTag(); ret->time = 0; - title = strdup(Player_LoadTitle(file)); + title = xstrdup(Player_LoadTitle(file)); if (title) addItemToMpdTag(ret, TAG_ITEM_TITLE, title); diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index 098b64da3..f0744f22c 100644 --- a/src/inputPlugins/mp3_plugin.c +++ b/src/inputPlugins/mp3_plugin.c @@ -293,7 +293,7 @@ static void mp3_parseId3Tag(mp3DecodeData * data, signed long tagsize, id3_data = data->stream.this_frame; mad_stream_skip(&(data->stream), tagsize); } else { - allocated = malloc(tagsize); + allocated = xmalloc(tagsize); if (!allocated) goto fail; @@ -682,8 +682,8 @@ static int decodeFirstFrame(mp3DecodeData * data, DecoderControl * dc, } } - data->frameOffset = malloc(sizeof(long) * data->maxFrames); - data->times = malloc(sizeof(mad_timer_t) * data->maxFrames); + data->frameOffset = xmalloc(sizeof(long) * data->maxFrames); + data->times = xmalloc(sizeof(mad_timer_t) * data->maxFrames); return 0; } diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c index 0cfa7f959..6c659cbb6 100644 --- a/src/inputPlugins/mp4_plugin.c +++ b/src/inputPlugins/mp4_plugin.c @@ -123,7 +123,7 @@ static int mp4_decode(OutputBuffer * cb, DecoderControl * dc, char *path) return -1; } - mp4cb = malloc(sizeof(mp4ff_callback_t)); + mp4cb = xmalloc(sizeof(mp4ff_callback_t)); mp4cb->read = mp4_inputStreamReadCallback; mp4cb->seek = mp4_inputStreamSeekCallback; mp4cb->user_data = &inStream; @@ -195,7 +195,7 @@ static int mp4_decode(OutputBuffer * cb, DecoderControl * dc, char *path) time = 0.0; - seekTable = malloc(sizeof(float) * numSamples); + seekTable = xmalloc(sizeof(float) * numSamples); for (sampleId = 0; sampleId < numSamples && !eof; sampleId++) { if (dc->seek) @@ -341,7 +341,7 @@ static MpdTag *mp4DataDup(char *file, int *mp4MetadataFound) return NULL; } - cb = malloc(sizeof(mp4ff_callback_t)); + cb = xmalloc(sizeof(mp4ff_callback_t)); cb->read = mp4_inputStreamReadCallback; cb->seek = mp4_inputStreamSeekCallback; cb->user_data = &inStream; |