From: Diego 'F. P. <fla...@gm...> - 2008-05-07 16:50:18
|
# HG changeset patch # User Diego 'Flameeyes' Pettenò <fla...@gm...> # Date 1210172340 -7200 # Node ID 2fadc829b90d3d18ba25c27c1617059ac49aa6ae # Parent 21ece21813e8eb8b4ff984bc8262488cc002e55f xine_xmalloc() deprecation: replace its use with static and non-zero size. The xine_xmalloc() function is going to be deprecated, as its behaviour is rarely needed as such, and it's thus misused. With this, almost all uses of xine_xmalloc() with static size (for instance the value returned by sizeof()) or with a size that is guaranteed not to be zero (like strlen()+1) are replaced with calls to either calloc(1, ...) or malloc(). malloc() is used whenever the allocated memory is going to be immediately overwritten, while calloc() is used in every other case, as it sets the whole memory area to zero. diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_alsa_out.c --- a/src/audio_out/audio_alsa_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_alsa_out.c Wed May 07 17:10:08 2008 +0200 @@ -1350,7 +1350,7 @@ static ao_driver_t *open_plugin (audio_d #define A52_PASSTHRU 12 int speakers; - this = (alsa_driver_t *) xine_xmalloc (sizeof (alsa_driver_t)); + this = calloc(1, sizeof (alsa_driver_t)); if (!this) return NULL; @@ -1682,7 +1682,7 @@ static void *init_class (xine_t *xine, v alsa_class_t *this; - this = (alsa_class_t *) xine_xmalloc (sizeof (alsa_class_t)); + this = calloc(1, sizeof (alsa_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_arts_out.c --- a/src/audio_out/audio_arts_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_arts_out.c Wed May 07 17:10:08 2008 +0200 @@ -303,7 +303,7 @@ static ao_driver_t *open_plugin (audio_d lprintf ("audio_arts_out: open_plugin called\n"); - this = (arts_driver_t *) xine_xmalloc (sizeof (arts_driver_t)); + this = calloc(1, sizeof (arts_driver_t)); if (!this) return NULL; @@ -384,7 +384,7 @@ static void *init_class (xine_t *xine, v lprintf ("audio_arts_out: init class\n"); - this = (arts_class_t *) xine_xmalloc (sizeof (arts_class_t)); + this = calloc(1, sizeof (arts_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_coreaudio_out.c --- a/src/audio_out/audio_coreaudio_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_coreaudio_out.c Wed May 07 17:10:08 2008 +0200 @@ -530,7 +530,7 @@ static ao_driver_t *open_plugin (audio_d lprintf ("open_plugin called\n"); - this = (coreaudio_driver_t *) xine_xmalloc (sizeof (coreaudio_driver_t)); + this = calloc(1, sizeof (coreaudio_driver_t)); if (!this) return NULL; @@ -582,7 +582,7 @@ static void *init_class (xine_t *xine, v lprintf ("init class\n"); - this = (coreaudio_class_t *) xine_xmalloc (sizeof (coreaudio_class_t)); + this = calloc(1, sizeof (coreaudio_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_directx2_out.c --- a/src/audio_out/audio_directx2_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_directx2_out.c Wed May 07 17:10:08 2008 +0200 @@ -955,7 +955,7 @@ static ao_driver_t *open_plugin(audio_dr lprintf("open plugin called\n"); - this = (dx2_driver_t *)xine_xmalloc(sizeof(dx2_driver_t)); + this = calloc(1, sizeof(dx2_driver_t)); if (!this) return NULL; @@ -1009,7 +1009,7 @@ static void *init_class(xine_t *xine, vo lprintf("init class\n"); - this = (dx2_class_t *)xine_xmalloc(sizeof(dx2_class_t)); + this = calloc(1, sizeof(dx2_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_directx_out.c --- a/src/audio_out/audio_directx_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_directx_out.c Wed May 07 17:10:08 2008 +0200 @@ -790,7 +790,7 @@ static ao_driver_t *open_plugin (audio_d audiox_class_t *class = (audiox_class_t *) class_gen; ao_directx_t *ao_directx; - ao_directx = ( ao_directx_t * ) xine_xmalloc( sizeof( ao_directx_t ) ); + ao_directx = calloc(1, sizeof(ao_directx_t)); if (!ao_directx) return NULL; @@ -841,7 +841,7 @@ static void *init_class (xine_t *xine, v /* * from this point on, nothing should go wrong anymore */ - audiox = (audiox_class_t *) xine_xmalloc (sizeof (audiox_class_t)); + audiox = calloc(1, sizeof (audiox_class_t)); if (!audiox) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_esd_out.c --- a/src/audio_out/audio_esd_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_esd_out.c Wed May 07 17:10:08 2008 +0200 @@ -521,7 +521,7 @@ static ao_driver_t *open_plugin (audio_d esd_close(audio_fd); - this = (esd_driver_t *) xine_xmalloc (sizeof (esd_driver_t)); + this = calloc(1, sizeof (esd_driver_t)); if (!this) return NULL; this->xine = class->xine; @@ -583,7 +583,7 @@ static void *init_class (xine_t *xine, v esd_class_t *this; - this = (esd_class_t *) xine_xmalloc (sizeof (esd_class_t)); + this = calloc(1, sizeof (esd_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_file_out.c --- a/src/audio_out/audio_file_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_file_out.c Wed May 07 17:10:08 2008 +0200 @@ -323,7 +323,7 @@ static ao_driver_t *open_plugin (audio_d lprintf ("open_plugin called\n"); - this = (file_driver_t *) xine_xmalloc (sizeof (file_driver_t)); + this = calloc(1, sizeof (file_driver_t)); if (!this) return NULL; @@ -375,7 +375,7 @@ static void *init_class (xine_t *xine, v lprintf ("init class\n"); - this = (file_class_t *) xine_xmalloc (sizeof (file_class_t)); + this = calloc(1, sizeof (file_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_fusionsound_out.c --- a/src/audio_out/audio_fusionsound_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_fusionsound_out.c Wed May 07 17:10:08 2008 +0200 @@ -393,7 +393,7 @@ static ao_driver_t* open_plugin(audio_dr char **argp = (char **) args; DFBResult ret; - this = (fusionsound_driver_t *) xine_xmalloc (sizeof(fusionsound_driver_t)); + this = calloc(1, sizeof(fusionsound_driver_t)); if (!this) { xprintf (class->xine, XINE_VERBOSITY_LOG, "audio_fusionsound_out: driver interface allocation failed!\n"); @@ -460,7 +460,7 @@ static void* init_class(xine_t *xine, vo return NULL; } - class = (fusionsound_class_t *) xine_xmalloc (sizeof( fusionsound_class_t)); + class = calloc(1, sizeof( fusionsound_class_t)); if (!class) { xprintf (xine, XINE_VERBOSITY_LOG, "audio_fusionsound_out: class interface allocation failed!\n"); diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_jack_out.c --- a/src/audio_out/audio_jack_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_jack_out.c Wed May 07 17:10:08 2008 +0200 @@ -328,7 +328,7 @@ static ao_driver_t *open_jack_plugin (au } } - this = (jack_driver_t *) xine_xmalloc (sizeof (jack_driver_t)); + this = calloc(1, sizeof (jack_driver_t)); this->client = client; @@ -416,7 +416,7 @@ static void *init_class (xine_t *xine, v jack_class_t *this; - this = (jack_class_t *) xine_xmalloc (sizeof (jack_class_t)); + this = calloc(1, sizeof (jack_class_t)); this->driver_class.open_plugin = open_jack_plugin; this->driver_class.get_identifier = get_identifier; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_none_out.c --- a/src/audio_out/audio_none_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_none_out.c Wed May 07 17:10:08 2008 +0200 @@ -186,7 +186,7 @@ static ao_driver_t *open_plugin (audio_d lprintf ("open_plugin called\n"); - this = (none_driver_t *) xine_xmalloc (sizeof (none_driver_t)); + this = calloc(1, sizeof (none_driver_t)); if (!this) return NULL; @@ -236,7 +236,7 @@ static void *init_class (xine_t *xine, v lprintf ("init class\n"); - this = (none_class_t *) xine_xmalloc (sizeof (none_class_t)); + this = calloc(1, sizeof (none_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_oss_out.c --- a/src/audio_out/audio_oss_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_oss_out.c Wed May 07 17:10:08 2008 +0200 @@ -729,7 +729,7 @@ static ao_driver_t *open_plugin (audio_d int speakers; - this = (oss_driver_t *) xine_xmalloc (sizeof (oss_driver_t)); + this = calloc(1, sizeof (oss_driver_t)); if (!this) return NULL; @@ -1170,7 +1170,7 @@ static void *init_class (xine_t *xine, v oss_class_t *this; - this = (oss_class_t *) xine_xmalloc (sizeof (oss_class_t)); + this = calloc(1, sizeof (oss_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_pulse_out.c --- a/src/audio_out/audio_pulse_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_pulse_out.c Wed May 07 17:10:08 2008 +0200 @@ -745,7 +745,7 @@ static ao_driver_t *open_plugin (audio_d lprintf ("audio_pulse_out: open_plugin called\n"); - this = (pulse_driver_t *) xine_xmalloc (sizeof (pulse_driver_t)); + this = calloc(1, sizeof (pulse_driver_t)); if (!this) return NULL; @@ -856,7 +856,7 @@ static void *init_class (xine_t *xine, v lprintf ("audio_pulse_out: init class\n"); - this = (pulse_class_t *) xine_xmalloc (sizeof (pulse_class_t)); + this = calloc(1, sizeof (pulse_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/audio_out/audio_sun_out.c --- a/src/audio_out/audio_sun_out.c Wed May 07 16:59:00 2008 +0200 +++ b/src/audio_out/audio_sun_out.c Wed May 07 17:10:08 2008 +0200 @@ -909,7 +909,7 @@ static ao_driver_t *ao_sun_open_plugin ( int status; audio_info_t info; - this = (sun_driver_t *) xine_xmalloc (sizeof (sun_driver_t)); + this = calloc(1, sizeof (sun_driver_t)); if (!this) return NULL; @@ -1032,7 +1032,7 @@ static void *ao_sun_init_class (xine_t * static void *ao_sun_init_class (xine_t *xine, void *data) { sun_class_t *this; - this = (sun_class_t *) xine_xmalloc (sizeof (sun_class_t)); + this = calloc(1, sizeof (sun_class_t)); if (!this) return NULL; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/decoder_flac.c --- a/src/combined/decoder_flac.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/decoder_flac.c Wed May 07 17:10:08 2008 +0200 @@ -337,7 +337,7 @@ open_plugin (audio_decoder_class_t *clas open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream) { flac_decoder_t *this ; - this = (flac_decoder_t *) xine_xmalloc (sizeof (flac_decoder_t)); + this = calloc(1, sizeof (flac_decoder_t)); this->audio_decoder.decode_data = flac_decode_data; this->audio_decoder.reset = flac_reset; @@ -409,7 +409,7 @@ init_plugin (xine_t *xine, void *data) { init_plugin (xine_t *xine, void *data) { flac_class_t *this; - this = (flac_class_t *) xine_xmalloc (sizeof (flac_class_t)); + this = calloc(1, sizeof (flac_class_t)); this->decoder_class.open_plugin = open_plugin; this->decoder_class.get_identifier = get_identifier; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/decoder_wavpack.c --- a/src/combined/decoder_wavpack.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/decoder_wavpack.c Wed May 07 17:10:08 2008 +0200 @@ -291,7 +291,7 @@ static void wavpack_dispose (audio_decod } static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream) { - wavpack_decoder_t * const this = (wavpack_decoder_t *) xine_xmalloc (sizeof (wavpack_decoder_t)); + wavpack_decoder_t * const this = calloc(1, sizeof (wavpack_decoder_t)); this->audio_decoder.decode_data = wavpack_decode_data; this->audio_decoder.reset = wavpack_reset; @@ -324,7 +324,7 @@ void *decoder_wavpack_init_plugin (xine_ void *decoder_wavpack_init_plugin (xine_t *xine, void *data) { wavpack_class_t *this; - this = (wavpack_class_t *) xine_xmalloc (sizeof (wavpack_class_t)); + this = calloc(1, sizeof (wavpack_class_t)); this->decoder_class.open_plugin = open_plugin; this->decoder_class.get_identifier = get_identifier; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/demux_flac.c --- a/src/combined/demux_flac.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/demux_flac.c Wed May 07 17:10:08 2008 +0200 @@ -607,7 +607,7 @@ open_plugin (demux_class_t *class_gen, * if we reach this point, the input has been accepted. */ - this = xine_xmalloc (sizeof (demux_flac_t)); + this = calloc(1, sizeof (demux_flac_t)); this->stream = stream; this->input = input; @@ -752,7 +752,7 @@ demux_flac_init_class (xine_t *xine, voi lprintf("demux_flac_init_class\n"); - this = xine_xmalloc (sizeof (demux_flac_class_t)); + this = calloc(1, sizeof (demux_flac_class_t)); this->config = xine->config; this->xine = xine; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/demux_wavpack.c --- a/src/combined/demux_wavpack.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/demux_wavpack.c Wed May 07 17:10:08 2008 +0200 @@ -332,7 +332,7 @@ static demux_plugin_t *open_plugin (demu static demux_plugin_t *open_plugin (demux_class_t *const class_gen, xine_stream_t *const stream, input_plugin_t *const input) { - demux_wv_t *const this = xine_xmalloc (sizeof (demux_wv_t)); + demux_wv_t *const this = calloc(1, sizeof (demux_wv_t)); this->stream = stream; this->input = input; @@ -401,7 +401,7 @@ static void class_dispose (demux_class_t } void *demux_wv_init_plugin (xine_t *const xine, void *const data) { - demux_wv_class_t *const this = xine_xmalloc (sizeof (demux_wv_class_t)); + demux_wv_class_t *const this = calloc(1, sizeof (demux_wv_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/ffmpeg/ff_audio_decoder.c --- a/src/combined/ffmpeg/ff_audio_decoder.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/ffmpeg/ff_audio_decoder.c Wed May 07 17:10:08 2008 +0200 @@ -178,7 +178,7 @@ static void ff_audio_decode_data (audio_ this->context->bit_rate = audio_header->nAvgBytesPerSec * 8; if(audio_header->cbSize > 0) { - this->context->extradata = xine_xmalloc(audio_header->cbSize); + this->context->extradata = malloc(audio_header->cbSize); this->context->extradata_size = audio_header->cbSize; memcpy( this->context->extradata, (uint8_t *)audio_header + sizeof(xine_waveformatex), @@ -203,7 +203,7 @@ static void ff_audio_decode_data (audio_ this->context->block_align = _X_BE_32(&this->buf[0x18]); this->context->extradata_size = 5*sizeof(short); - this->context->extradata = xine_xmalloc(this->context->extradata_size); + this->context->extradata = malloc(this->context->extradata_size); ptr = (short *) this->context->extradata; @@ -276,7 +276,7 @@ static void ff_audio_decode_data (audio_ this->size = 0; - this->decode_buffer = xine_xmalloc(AVCODEC_MAX_AUDIO_FRAME_SIZE); + this->decode_buffer = calloc(1, AVCODEC_MAX_AUDIO_FRAME_SIZE); return; } @@ -450,7 +450,7 @@ static audio_decoder_t *ff_audio_open_pl ff_audio_decoder_t *this ; - this = (ff_audio_decoder_t *) xine_xmalloc (sizeof (ff_audio_decoder_t)); + this = calloc(1, sizeof (ff_audio_decoder_t)); this->audio_decoder.decode_data = ff_audio_decode_data; this->audio_decoder.reset = ff_audio_reset; @@ -486,7 +486,7 @@ void *init_audio_plugin (xine_t *xine, v ff_audio_class_t *this ; - this = (ff_audio_class_t *) xine_xmalloc (sizeof (ff_audio_class_t)); + this = calloc(1, sizeof (ff_audio_class_t)); this->decoder_class.open_plugin = ff_audio_open_plugin; this->decoder_class.get_identifier = ff_audio_get_identifier; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/ffmpeg/ff_dvaudio_decoder.c --- a/src/combined/ffmpeg/ff_dvaudio_decoder.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/ffmpeg/ff_dvaudio_decoder.c Wed May 07 17:10:08 2008 +0200 @@ -251,10 +251,10 @@ static void dvaudio_decode_data (audio_d return; if (buf->decoder_flags & BUF_FLAG_STDHEADER) { - this->buf = xine_xmalloc(AUDIOBUFSIZE); + this->buf = calloc(1, AUDIOBUFSIZE); this->bufsize = AUDIOBUFSIZE; this->size = 0; - this->decode_buffer = xine_xmalloc(MAXFRAMESIZE); + this->decode_buffer = calloc(1, MAXFRAMESIZE); this->audio_sample_rate = buf->decoder_info[1]; this->audio_bits = buf->decoder_info[2]; @@ -368,7 +368,7 @@ static audio_decoder_t *dvaudio_open_plu dvaudio_decoder_t *this ; - this = (dvaudio_decoder_t *) xine_xmalloc (sizeof (dvaudio_decoder_t)); + this = calloc(1, sizeof (dvaudio_decoder_t)); this->audio_decoder.decode_data = dvaudio_decode_data; this->audio_decoder.reset = dvaudio_reset; @@ -401,7 +401,7 @@ static void *init_dvaudio_plugin (xine_t dvaudio_class_t *this ; - this = (dvaudio_class_t *) xine_xmalloc (sizeof (dvaudio_class_t)); + this = calloc(1, sizeof (dvaudio_class_t)); this->decoder_class.open_plugin = dvaudio_open_plugin; this->decoder_class.get_identifier = dvaudio_get_identifier; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/ffmpeg/ff_mpeg_parser.c --- a/src/combined/ffmpeg/ff_mpeg_parser.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/ffmpeg/ff_mpeg_parser.c Wed May 07 17:10:08 2008 +0200 @@ -50,7 +50,7 @@ static const int frame_rate_tab[][2] = { void mpeg_parser_init (mpeg_parser_t *parser) { - parser->chunk_buffer = xine_xmalloc(BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); + parser->chunk_buffer = malloc(BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); mpeg_parser_reset(parser); } diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/ffmpeg/ff_video_decoder.c --- a/src/combined/ffmpeg/ff_video_decoder.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/ffmpeg/ff_video_decoder.c Wed May 07 17:10:08 2008 +0200 @@ -895,7 +895,7 @@ static void ff_handle_preview_buffer (ff if (codec_type == BUF_VIDEO_MPEG) { this->is_mpeg12 = 1; if ( this->mpeg_parser == NULL ) { - this->mpeg_parser = xine_xmalloc(sizeof(mpeg_parser_t)); + this->mpeg_parser = calloc(1, sizeof(mpeg_parser_t)); mpeg_parser_init(this->mpeg_parser); this->decoder_init_mode = 0; } @@ -950,7 +950,7 @@ static void ff_handle_header_buffer (ff_ this->context->sub_id = _X_BE_32(&this->buf[30]); - this->context->slice_offset = xine_xmalloc(sizeof(int)*SLICE_OFFSET_SIZE); + this->context->slice_offset = calloc(SLICE_OFFSET_SIZE, sizeof(int)); this->slice_offset_size = SLICE_OFFSET_SIZE; this->context->extradata_size = this->size - 26; @@ -998,8 +998,8 @@ static void ff_handle_special_buffer (ff lprintf("BUF_SPECIAL_STSD_ATOM\n"); this->context->extradata_size = buf->decoder_info[2]; - this->context->extradata = xine_xmalloc(buf->decoder_info[2] + - FF_INPUT_BUFFER_PADDING_SIZE); + this->context->extradata = malloc(buf->decoder_info[2] + + FF_INPUT_BUFFER_PADDING_SIZE); memcpy(this->context->extradata, buf->decoder_info_ptr[2], buf->decoder_info[2]); @@ -1008,8 +1008,8 @@ static void ff_handle_special_buffer (ff lprintf("BUF_SPECIAL_DECODER_CONFIG\n"); this->context->extradata_size = buf->decoder_info[2]; - this->context->extradata = xine_xmalloc(buf->decoder_info[2] + - FF_INPUT_BUFFER_PADDING_SIZE); + this->context->extradata = malloc(buf->decoder_info[2] + + FF_INPUT_BUFFER_PADDING_SIZE); memcpy(this->context->extradata, buf->decoder_info_ptr[2], buf->decoder_info[2]); @@ -1557,7 +1557,7 @@ static video_decoder_t *ff_video_open_pl lprintf ("open_plugin\n"); - this = (ff_video_decoder_t *) xine_xmalloc (sizeof (ff_video_decoder_t)); + this = calloc(1, sizeof (ff_video_decoder_t)); this->video_decoder.decode_data = ff_decode_data; this->video_decoder.flush = ff_flush; @@ -1576,7 +1576,7 @@ static video_decoder_t *ff_video_open_pl this->decoder_ok = 0; this->decoder_init_mode = 1; - this->buf = xine_xmalloc(VIDEOBUFSIZE + FF_INPUT_BUFFER_PADDING_SIZE); + this->buf = calloc(1, VIDEOBUFSIZE + FF_INPUT_BUFFER_PADDING_SIZE); this->bufsize = VIDEOBUFSIZE; this->is_mpeg12 = 0; @@ -1614,7 +1614,7 @@ void *init_video_plugin (xine_t *xine, v ff_video_class_t *this; config_values_t *config; - this = (ff_video_class_t *) xine_xmalloc (sizeof (ff_video_class_t)); + this = calloc(1, sizeof (ff_video_class_t)); this->decoder_class.open_plugin = ff_video_open_plugin; this->decoder_class.get_identifier = ff_video_get_identifier; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/combined/ffmpeg/ffmpeg_encoder.c --- a/src/combined/ffmpeg/ffmpeg_encoder.c Wed May 07 16:59:00 2008 +0200 +++ b/src/combined/ffmpeg/ffmpeg_encoder.c Wed May 07 17:10:08 2008 +0200 @@ -78,7 +78,7 @@ int dxr3_encoder_init(dxr3_driver_t *drv avcodec_register_all(); lprintf("lavc init , version %x\n", avcodec_version()); - this = xine_xmalloc(sizeof(lavc_data_t)); + this = calloc(1, sizeof(lavc_data_t)); if (!this) return 0; this->encoder_data.type = ENC_LAVC; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_4xm.c --- a/src/demuxers/demux_4xm.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_4xm.c Wed May 07 17:10:08 2008 +0200 @@ -472,7 +472,7 @@ static demux_plugin_t *open_plugin (demu demux_fourxm_t *this; - this = xine_xmalloc (sizeof (demux_fourxm_t)); + this = calloc(1, sizeof(demux_fourxm_t)); this->stream = stream; this->input = input; @@ -546,7 +546,7 @@ void *demux_fourxm_init_plugin (xine_t * void *demux_fourxm_init_plugin (xine_t *xine, void *data) { demux_fourxm_class_t *this; - this = xine_xmalloc (sizeof (demux_fourxm_class_t)); + this = calloc(1, sizeof(demux_fourxm_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_aac.c --- a/src/demuxers/demux_aac.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_aac.c Wed May 07 17:10:08 2008 +0200 @@ -262,7 +262,7 @@ static demux_plugin_t *open_plugin (demu demux_aac_t *this; - this = xine_xmalloc (sizeof (demux_aac_t)); + this = calloc(1, sizeof(demux_aac_t)); this->stream = stream; this->input = input; @@ -333,7 +333,7 @@ void *demux_aac_init_plugin (xine_t *xin void *demux_aac_init_plugin (xine_t *xine, void *data) { demux_aac_class_t *this; - this = xine_xmalloc (sizeof (demux_aac_class_t)); + this = calloc(1, sizeof(demux_aac_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_ac3.c --- a/src/demuxers/demux_ac3.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_ac3.c Wed May 07 17:10:08 2008 +0200 @@ -417,7 +417,7 @@ static demux_plugin_t *open_plugin (demu demux_ac3_t *this; - this = xine_xmalloc (sizeof (demux_ac3_t)); + this = calloc(1, sizeof(demux_ac3_t)); this->stream = stream; this->input = input; @@ -491,7 +491,7 @@ void *demux_ac3_init_plugin (xine_t *xin void *demux_ac3_init_plugin (xine_t *xine, void *data) { demux_ac3_class_t *this; - this = xine_xmalloc (sizeof (demux_ac3_class_t)); + this = calloc(1, sizeof(demux_ac3_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_aiff.c --- a/src/demuxers/demux_aiff.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_aiff.c Wed May 07 17:10:08 2008 +0200 @@ -369,7 +369,7 @@ static demux_plugin_t *open_plugin (demu demux_aiff_t *this; - this = xine_xmalloc (sizeof (demux_aiff_t)); + this = calloc(1, sizeof(demux_aiff_t)); this->stream = stream; this->input = input; @@ -445,7 +445,7 @@ void *demux_aiff_init_plugin (xine_t *xi void *demux_aiff_init_plugin (xine_t *xine, void *data) { demux_aiff_class_t *this; - this = xine_xmalloc (sizeof (demux_aiff_class_t)); + this = calloc(1, sizeof(demux_aiff_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_asf.c --- a/src/demuxers/demux_asf.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_asf.c Wed May 07 17:10:08 2008 +0200 @@ -2073,7 +2073,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_asf_t)); + this = calloc(1, sizeof(demux_asf_t)); this->stream = stream; this->input = input; @@ -2148,7 +2148,7 @@ static void *init_class (xine_t *xine, v demux_asf_class_t *this; - this = xine_xmalloc (sizeof (demux_asf_class_t)); + this = calloc(1, sizeof(demux_asf_class_t)); this->config = xine->config; this->xine = xine; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_aud.c --- a/src/demuxers/demux_aud.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_aud.c Wed May 07 17:10:08 2008 +0200 @@ -270,7 +270,7 @@ static demux_plugin_t *open_plugin (demu demux_aud_t *this; - this = xine_xmalloc (sizeof (demux_aud_t)); + this = calloc(1, sizeof(demux_aud_t)); this->stream = stream; this->input = input; @@ -343,7 +343,7 @@ void *demux_aud_init_plugin (xine_t *xin void *demux_aud_init_plugin (xine_t *xine, void *data) { demux_aud_class_t *this; - this = xine_xmalloc (sizeof (demux_aud_class_t)); + this = calloc(1, sizeof(demux_aud_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_avi.c --- a/src/demuxers/demux_avi.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_avi.c Wed May 07 17:10:08 2008 +0200 @@ -739,7 +739,7 @@ static avi_t *AVI_init(demux_avi_t *this /* Create avi_t structure */ lprintf("start\n"); - AVI = (avi_t *) xine_xmalloc(sizeof(avi_t)); + AVI = (avi_t *) calloc(1, sizeof(avi_t)); if(AVI==NULL) { this->AVI_errno = AVI_ERR_NO_MEM; return 0; @@ -877,7 +877,7 @@ static avi_t *AVI_init(demux_avi_t *this } else if (strncasecmp (hdrl_data+i,"auds",4) ==0 /* && ! auds_strh_seen*/) { if(AVI->n_audio < MAX_AUDIO_STREAMS) { - avi_audio_t *a = (avi_audio_t *) xine_xmalloc(sizeof(avi_audio_t)); + avi_audio_t *a = (avi_audio_t *) calloc(1, sizeof(avi_audio_t)); if(a==NULL) { this->AVI_errno = AVI_ERR_NO_MEM; return 0; @@ -2281,7 +2281,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_avi_t)); + this = calloc(1, sizeof(demux_avi_t)); this->stream = stream; this->input = input; @@ -2347,7 +2347,7 @@ static void *init_class (xine_t *xine, v static void *init_class (xine_t *xine, void *data) { demux_avi_class_t *this; - this = xine_xmalloc (sizeof (demux_avi_class_t)); + this = calloc(1, sizeof(demux_avi_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_cdda.c --- a/src/demuxers/demux_cdda.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_cdda.c Wed May 07 17:10:08 2008 +0200 @@ -187,7 +187,7 @@ static demux_plugin_t *open_plugin (demu demux_cdda_t *this; - this = xine_xmalloc (sizeof (demux_cdda_t)); + this = calloc(1, sizeof(demux_cdda_t)); this->stream = stream; this->input = input; @@ -250,7 +250,7 @@ void *demux_cdda_init_plugin (xine_t *xi void *demux_cdda_init_plugin (xine_t *xine, void *data) { demux_cdda_class_t *this; - this = xine_xmalloc (sizeof (demux_cdda_class_t)); + this = calloc(1, sizeof(demux_cdda_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_dts.c --- a/src/demuxers/demux_dts.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_dts.c Wed May 07 17:10:08 2008 +0200 @@ -392,7 +392,7 @@ static demux_plugin_t *open_plugin (demu demux_dts_t *this; - this = xine_xmalloc (sizeof (demux_dts_t)); + this = calloc(1, sizeof(demux_dts_t)); this->stream = stream; this->input = input; @@ -464,7 +464,7 @@ void *demux_dts_init_plugin (xine_t *xin void *demux_dts_init_plugin (xine_t *xine, void *data) { demux_dts_class_t *this; - this = xine_xmalloc (sizeof (demux_dts_class_t)); + this = calloc(1, sizeof(demux_dts_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_eawve.c --- a/src/demuxers/demux_eawve.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_eawve.c Wed May 07 17:10:08 2008 +0200 @@ -349,7 +349,7 @@ static demux_plugin_t* open_plugin(demux if (!INPUT_IS_SEEKABLE(input)) return NULL; - this = xine_xmalloc(sizeof(demux_eawve_t)); + this = calloc(1, sizeof(demux_eawve_t)); this->stream = stream; this->input = input; @@ -421,7 +421,7 @@ void *demux_eawve_init_plugin(xine_t *xi void *demux_eawve_init_plugin(xine_t *xine, void *data) { demux_eawve_class_t *this; - this = xine_xmalloc(sizeof(demux_eawve_class_t)); + this = calloc(1, sizeof(demux_eawve_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_elem.c --- a/src/demuxers/demux_elem.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_elem.c Wed May 07 17:10:08 2008 +0200 @@ -240,7 +240,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_mpeg_elem_t)); + this = calloc(1, sizeof(demux_mpeg_elem_t)); this->stream = stream; this->input = input; @@ -284,7 +284,7 @@ static void *init_plugin (xine_t *xine, static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_elem_class_t *this; - this = xine_xmalloc (sizeof (demux_mpeg_elem_class_t)); + this = calloc(1, sizeof(demux_mpeg_elem_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_film.c --- a/src/demuxers/demux_film.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_film.c Wed May 07 17:10:08 2008 +0200 @@ -858,7 +858,7 @@ static demux_plugin_t *open_plugin (demu demux_film_t *this; - this = xine_xmalloc (sizeof (demux_film_t)); + this = calloc(1, sizeof(demux_film_t)); this->stream = stream; this->input = input; @@ -932,7 +932,7 @@ void *demux_film_init_plugin (xine_t *xi void *demux_film_init_plugin (xine_t *xine, void *data) { demux_film_class_t *this; - this = xine_xmalloc (sizeof (demux_film_class_t)); + this = calloc(1, sizeof(demux_film_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_flac.c --- a/src/demuxers/demux_flac.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_flac.c Wed May 07 17:10:08 2008 +0200 @@ -491,7 +491,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_flac_t)); + this = calloc(1, sizeof(demux_flac_t)); this->stream = stream; this->input = input; @@ -566,7 +566,7 @@ void *demux_flac_init_plugin (xine_t *xi void *demux_flac_init_plugin (xine_t *xine, void *data) { demux_flac_class_t *this; - this = xine_xmalloc (sizeof (demux_flac_class_t)); + this = calloc(1, sizeof(demux_flac_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_fli.c --- a/src/demuxers/demux_fli.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_fli.c Wed May 07 17:10:08 2008 +0200 @@ -303,7 +303,7 @@ static demux_plugin_t *open_plugin (demu demux_fli_t *this; - this = xine_xmalloc (sizeof (demux_fli_t)); + this = calloc(1, sizeof(demux_fli_t)); this->stream = stream; this->input = input; @@ -377,7 +377,7 @@ static void *init_plugin (xine_t *xine, static void *init_plugin (xine_t *xine, void *data) { demux_fli_class_t *this; - this = xine_xmalloc (sizeof (demux_fli_class_t)); + this = calloc(1, sizeof(demux_fli_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_flv.c --- a/src/demuxers/demux_flv.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_flv.c Wed May 07 17:10:08 2008 +0200 @@ -365,7 +365,7 @@ static int parse_flv_var(demux_flv_t *th } static void parse_flv_script(demux_flv_t *this, int size) { - unsigned char *buf = xine_xmalloc(size); + unsigned char *buf = malloc(size); unsigned char *tmp = buf; unsigned char *end = buf + size; int len; @@ -856,7 +856,7 @@ static demux_plugin_t *open_plugin (demu input_plugin_t *input) { demux_flv_t *this; - this = xine_xmalloc(sizeof (demux_flv_t)); + this = calloc(1, sizeof(demux_flv_t)); this->xine = stream->xine; this->stream = stream; this->input = input; @@ -924,7 +924,7 @@ static void *init_plugin (xine_t *xine, static void *init_plugin (xine_t *xine, void *data) { demux_flv_class_t *this; - this = xine_xmalloc (sizeof (demux_flv_class_t)); + this = calloc(1, sizeof(demux_flv_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_idcin.c --- a/src/demuxers/demux_idcin.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_idcin.c Wed May 07 17:10:08 2008 +0200 @@ -472,7 +472,7 @@ static demux_plugin_t *open_plugin (demu demux_idcin_t *this; - this = xine_xmalloc (sizeof (demux_idcin_t)); + this = calloc(1, sizeof(demux_idcin_t)); this->stream = stream; this->input = input; @@ -547,7 +547,7 @@ void *demux_idcin_init_plugin (xine_t *x void *demux_idcin_init_plugin (xine_t *xine, void *data) { demux_idcin_class_t *this; - this = xine_xmalloc (sizeof (demux_idcin_class_t)); + this = calloc(1, sizeof(demux_idcin_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_iff.c --- a/src/demuxers/demux_iff.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_iff.c Wed May 07 17:10:08 2008 +0200 @@ -212,7 +212,7 @@ static int read_iff_chunk(demux_iff_t *t break; case IFF_VHDR_CHUNK: if( this->vhdr == NULL ) - this->vhdr = (Voice8Header *)xine_xmalloc(sizeof(Voice8Header)); + this->vhdr = (Voice8Header *)calloc(1, sizeof(Voice8Header)); this->vhdr->oneShotHiSamples = _X_BE_32(&buffer[0]); this->vhdr->repeatHiSamples = _X_BE_32(&buffer[4]); this->vhdr->samplesPerHiCycle = _X_BE_32(&buffer[8]); @@ -330,7 +330,7 @@ static int read_iff_chunk(demux_iff_t *t break; case IFF_BMHD_CHUNK: if( this->bmhd == NULL ) - this->bmhd = (BitMapHeader *)xine_xmalloc(sizeof(BitMapHeader)); + this->bmhd = (BitMapHeader *)calloc(1, sizeof(BitMapHeader)); this->bmhd->w = _X_BE_16(&buffer[0]); this->bmhd->h = _X_BE_16(&buffer[2]); this->bmhd->x = _X_BE_16(&buffer[4]); @@ -406,13 +406,13 @@ static int read_iff_chunk(demux_iff_t *t break; case IFF_GRAB_CHUNK: if( this->grab == NULL ) - this->grab = (Point2D *)xine_xmalloc(sizeof(Point2D)); + this->grab = (Point2D *)calloc(1, sizeof(Point2D)); this->grab->x = _X_BE_16(&buffer[0]); this->grab->y = _X_BE_16(&buffer[2]); break; case IFF_DEST_CHUNK: if( this->dest == NULL ) - this->dest = (DestMerge *)xine_xmalloc(sizeof(DestMerge)); + this->dest = (DestMerge *)calloc(1, sizeof(DestMerge)); this->dest->depth = buffer[0]; this->dest->pad1 = buffer[1]; this->dest->plane_pick = _X_BE_16(&buffer[2]); @@ -424,7 +424,7 @@ static int read_iff_chunk(demux_iff_t *t break; case IFF_CAMG_CHUNK: if( this->camg == NULL ) - this->camg = (CamgChunk *)xine_xmalloc(sizeof(CamgChunk)); + this->camg = (CamgChunk *)calloc(1, sizeof(CamgChunk)); this->camg->view_modes = _X_BE_32(&buffer[0]); this->bih.biCompression = this->camg->view_modes; if( this->camg->view_modes & CAMG_PAL && @@ -443,7 +443,7 @@ static int read_iff_chunk(demux_iff_t *t break; case IFF_CCRT_CHUNK: if( this->ccrt == NULL ) - this->ccrt = (CcrtChunk *)xine_xmalloc(sizeof(CcrtChunk)); + this->ccrt = (CcrtChunk *)calloc(1, sizeof(CcrtChunk)); this->ccrt->direction = _X_BE_16(&buffer[0]); this->ccrt->start = buffer[2]; this->ccrt->end = buffer[3]; @@ -453,13 +453,13 @@ static int read_iff_chunk(demux_iff_t *t break; case IFF_DPI_CHUNK: if( this->dpi == NULL ) - this->dpi = (DPIHeader *)xine_xmalloc(sizeof(DPIHeader)); + this->dpi = (DPIHeader *)calloc(1, sizeof(DPIHeader)); this->dpi->x = _X_BE_16(&buffer[0]); this->dpi->y = _X_BE_16(&buffer[0]); break; case IFF_ANHD_CHUNK: if( this->anhd == NULL ) - this->anhd = (AnimHeader *)xine_xmalloc(sizeof(AnimHeader)); + this->anhd = (AnimHeader *)calloc(1, sizeof(AnimHeader)); this->anhd->operation = buffer[0]; this->anhd->mask = buffer[1]; this->anhd->w = _X_BE_16(&buffer[2]); @@ -500,7 +500,7 @@ static int read_iff_chunk(demux_iff_t *t break; case IFF_DPAN_CHUNK: if( this->dpan == NULL ) - this->dpan = (DPAnimChunk *)xine_xmalloc(sizeof(DPAnimChunk)); + this->dpan = (DPAnimChunk *)calloc(1, sizeof(DPAnimChunk)); this->dpan->version = _X_BE_16(&buffer[0]); this->dpan->nframes = _X_BE_16(&buffer[2]); this->dpan->fps = buffer[4]; @@ -1242,7 +1242,7 @@ static demux_plugin_t *open_plugin (demu demux_iff_t *this; - this = xine_xmalloc (sizeof (demux_iff_t)); + this = calloc(1, sizeof(demux_iff_t)); this->stream = stream; this->input = input; @@ -1323,7 +1323,7 @@ static void *init_plugin (xine_t *xine, static void *init_plugin (xine_t *xine, void *data) { demux_iff_class_t *this; - this = xine_xmalloc (sizeof (demux_iff_class_t)); + this = calloc(1, sizeof(demux_iff_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_image.c --- a/src/demuxers/demux_image.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_image.c Wed May 07 17:10:08 2008 +0200 @@ -198,7 +198,7 @@ static demux_plugin_t *open_plugin (demu * if we reach this point, the input has been accepted. */ - this = xine_xmalloc (sizeof (demux_image_t)); + this = calloc(1, sizeof(demux_image_t)); this->stream = stream; this->input = input; @@ -249,7 +249,7 @@ static void *init_class (xine_t *xine, v static void *init_class (xine_t *xine, void *data) { demux_image_class_t *this; - this = xine_xmalloc (sizeof (demux_image_class_t)); + this = calloc(1, sizeof(demux_image_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_ipmovie.c --- a/src/demuxers/demux_ipmovie.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_ipmovie.c Wed May 07 17:10:08 2008 +0200 @@ -672,7 +672,7 @@ static demux_plugin_t *open_plugin (demu demux_ipmovie_t *this; - this = xine_xmalloc (sizeof (demux_ipmovie_t)); + this = calloc(1, sizeof(demux_ipmovie_t)); this->stream = stream; this->input = input; @@ -747,7 +747,7 @@ void *demux_ipmovie_init_plugin (xine_t void *demux_ipmovie_init_plugin (xine_t *xine, void *data) { demux_ipmovie_class_t *this; - this = xine_xmalloc (sizeof (demux_ipmovie_class_t)); + this = calloc(1, sizeof(demux_ipmovie_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_matroska.c --- a/src/demuxers/demux_matroska.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_matroska.c Wed May 07 17:10:08 2008 +0200 @@ -1210,7 +1210,7 @@ static int parse_track_entry(demux_matro lprintf("Video\n"); if (track->video_track) return 1; - track->video_track = (matroska_video_track_t *)xine_xmalloc(sizeof(matroska_video_track_t)); + track->video_track = (matroska_video_track_t *)calloc(1, sizeof(matroska_video_track_t)); if (!ebml_read_master (ebml, &elem)) return 0; if ((elem.len > 0) && !parse_video_track(this, track->video_track)) @@ -1221,7 +1221,7 @@ static int parse_track_entry(demux_matro lprintf("Audio\n"); if (track->audio_track) return 1; - track->audio_track = (matroska_audio_track_t *)xine_xmalloc(sizeof(matroska_audio_track_t)); + track->audio_track = (matroska_audio_track_t *)calloc(1, sizeof(matroska_audio_track_t)); if (!ebml_read_master (ebml, &elem)) return 0; if ((elem.len > 0) && !parse_audio_track(this, track->audio_track)) @@ -1511,7 +1511,7 @@ static int parse_tracks(demux_matroska_t matroska_track_t *track; /* alloc and initialize a track with 0 */ - track = xine_xmalloc(sizeof(matroska_track_t)); + track = calloc(1, sizeof(matroska_track_t)); track->compress_algo = MATROSKA_COMPRESS_NONE; this->tracks[this->num_tracks] = track; @@ -2853,7 +2853,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_matroska_t)); + this = calloc(1, sizeof(demux_matroska_t)); this->demux_plugin.send_headers = demux_matroska_send_headers; this->demux_plugin.send_chunk = demux_matroska_send_chunk; @@ -2929,7 +2929,7 @@ static void *init_class (xine_t *xine, v demux_matroska_class_t *this; - this = xine_xmalloc (sizeof (demux_matroska_class_t)); + this = calloc(1, sizeof(demux_matroska_class_t)); this->xine = xine; this->demux_class.open_plugin = open_plugin; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_mng.c --- a/src/demuxers/demux_mng.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_mng.c Wed May 07 17:10:08 2008 +0200 @@ -260,7 +260,7 @@ static demux_plugin_t* open_plugin(demux demux_mng_t *this; - this = xine_xmalloc (sizeof (demux_mng_t)); + this = calloc(1, sizeof(demux_mng_t)); this->stream = stream; this->input = input; @@ -360,7 +360,7 @@ static void *init_plugin(xine_t *xine, v static void *init_plugin(xine_t *xine, void *data){ demux_mng_class_t *this; - this = xine_xmalloc (sizeof (demux_mng_class_t)); + this = calloc(1, sizeof(demux_mng_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_mod.c --- a/src/demuxers/demux_mod.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_mod.c Wed May 07 17:10:08 2008 +0200 @@ -305,7 +305,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_mod_t)); + this = calloc(1, sizeof(demux_mod_t)); this->stream = stream; this->input = input; @@ -380,7 +380,7 @@ void *demux_mod_init_plugin (xine_t *xin void *demux_mod_init_plugin (xine_t *xine, void *data) { demux_mod_class_t *this; - this = xine_xmalloc (sizeof (demux_mod_class_t)); + this = calloc(1, sizeof(demux_mod_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_mpc.c --- a/src/demuxers/demux_mpc.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_mpc.c Wed May 07 17:10:08 2008 +0200 @@ -324,7 +324,7 @@ static demux_plugin_t *open_plugin (demu demux_mpc_t *this; - this = xine_xmalloc (sizeof (demux_mpc_t)); + this = calloc(1, sizeof(demux_mpc_t)); this->stream = stream; this->input = input; @@ -398,7 +398,7 @@ void *demux_mpc_init_plugin (xine_t *xin void *demux_mpc_init_plugin (xine_t *xine, void *data) { demux_mpc_class_t *this; - this = xine_xmalloc (sizeof (demux_mpc_class_t)); + this = calloc(1, sizeof(demux_mpc_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_mpeg.c --- a/src/demuxers/demux_mpeg.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_mpeg.c Wed May 07 17:10:08 2008 +0200 @@ -1067,7 +1067,7 @@ static demux_plugin_t *open_plugin (demu input_plugin_t *input) { demux_mpeg_t *this; - this = xine_xmalloc (sizeof (demux_mpeg_t)); + this = calloc(1, sizeof(demux_mpeg_t)); this->stream = stream; this->input = input; @@ -1246,7 +1246,7 @@ static void *init_plugin (xine_t *xine, static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_class_t *this; - this = xine_xmalloc (sizeof (demux_mpeg_class_t)); + this = calloc(1, sizeof(demux_mpeg_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_mpeg_block.c --- a/src/demuxers/demux_mpeg_block.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_mpeg_block.c Wed May 07 17:10:08 2008 +0200 @@ -1371,7 +1371,7 @@ static demux_plugin_t *open_plugin (demu input_plugin_t *input = (input_plugin_t *) input_gen; demux_mpeg_block_t *this; - this = xine_xmalloc (sizeof (demux_mpeg_block_t)); + this = calloc(1, sizeof(demux_mpeg_block_t)); this->stream = stream; this->input = input; @@ -1540,7 +1540,7 @@ static void *init_plugin (xine_t *xine, demux_mpeg_block_class_t *this; - this = xine_xmalloc (sizeof (demux_mpeg_block_class_t)); + this = calloc(1, sizeof(demux_mpeg_block_class_t)); this->config = xine->config; this->xine = xine; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_mpeg_pes.c --- a/src/demuxers/demux_mpeg_pes.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_mpeg_pes.c Wed May 07 17:10:08 2008 +0200 @@ -1613,7 +1613,7 @@ static demux_plugin_t *open_plugin (demu input_plugin_t *input = (input_plugin_t *) input_gen; demux_mpeg_pes_t *this; - this = xine_xmalloc (sizeof (demux_mpeg_pes_t)); + this = calloc(1, sizeof(demux_mpeg_pes_t)); this->stream = stream; this->input = input; @@ -1786,7 +1786,7 @@ static void *init_plugin (xine_t *xine, static void *init_plugin (xine_t *xine, void *data) { demux_mpeg_pes_class_t *this; - this = xine_xmalloc (sizeof (demux_mpeg_pes_class_t)); + this = calloc(1, sizeof(demux_mpeg_pes_class_t)); this->config = xine->config; this->xine = xine; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_mpgaudio.c --- a/src/demuxers/demux_mpgaudio.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_mpgaudio.c Wed May 07 17:10:08 2008 +0200 @@ -341,7 +341,7 @@ static xing_header_t* parse_xing_header( int has_frames_flag = 0; int has_bytes_flag = 0; - xing = xine_xmalloc (sizeof (xing_header_t)); + xing = calloc(1, sizeof(xing_header_t)); if (!xing) goto exit_error; @@ -427,7 +427,7 @@ static vbri_header_t* parse_vbri_header( uint8_t *ptr = buf; vbri_header_t *vbri; - vbri = xine_xmalloc (sizeof (vbri_header_t)); + vbri = calloc(1, sizeof(vbri_header_t)); if (!vbri) return NULL; @@ -1148,7 +1148,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_mpgaudio_t)); + this = calloc(1, sizeof(demux_mpgaudio_t)); this->demux_plugin.send_headers = demux_mpgaudio_send_headers; this->demux_plugin.send_chunk = demux_mpgaudio_send_chunk; @@ -1223,7 +1223,7 @@ void *demux_mpgaudio_init_class (xine_t demux_mpgaudio_class_t *this; - this = xine_xmalloc (sizeof (demux_mpgaudio_class_t)); + this = calloc(1, sizeof(demux_mpgaudio_class_t)); this->xine = xine; this->demux_class.open_plugin = open_plugin; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_nsf.c --- a/src/demuxers/demux_nsf.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_nsf.c Wed May 07 17:10:08 2008 +0200 @@ -303,7 +303,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_nsf_t)); + this = calloc(1, sizeof(demux_nsf_t)); this->stream = stream; this->input = input; @@ -377,7 +377,7 @@ void *demux_nsf_init_plugin (xine_t *xin void *demux_nsf_init_plugin (xine_t *xine, void *data) { demux_nsf_class_t *this; - this = xine_xmalloc (sizeof (demux_nsf_class_t)); + this = calloc(1, sizeof(demux_nsf_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_nsv.c --- a/src/demuxers/demux_nsv.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_nsv.c Wed May 07 17:10:08 2008 +0200 @@ -594,7 +594,7 @@ static demux_plugin_t *open_plugin (demu demux_nsv_t *this; - this = xine_xmalloc (sizeof (demux_nsv_t)); + this = calloc(1, sizeof(demux_nsv_t)); this->stream = stream; this->input = input; @@ -668,7 +668,7 @@ static void *demux_nsv_init_plugin (xine static void *demux_nsv_init_plugin (xine_t *xine, void *data) { demux_nsv_class_t *this; - this = xine_xmalloc (sizeof (demux_nsv_class_t)); + this = calloc(1, sizeof(demux_nsv_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_ogg.c --- a/src/demuxers/demux_ogg.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_ogg.c Wed May 07 17:10:08 2008 +0200 @@ -194,7 +194,7 @@ static int new_stream_info (demux_ogg_t static int new_stream_info (demux_ogg_t *this, const int cur_serno) { int stream_num; - this->si[this->num_streams] = (stream_info_t *)xine_xmalloc(sizeof(stream_info_t)); + this->si[this->num_streams] = (stream_info_t *)calloc(1, sizeof(stream_info_t)); ogg_stream_init(&this->si[this->num_streams]->oss, cur_serno); stream_num = this->num_streams; this->si[stream_num]->buf_types = 0; @@ -498,7 +498,7 @@ static void read_chapter_comment (demux_ lprintf("time: %d %d %d %d\n", hour, min,sec,msec); if (!this->chapter_info) { - this->chapter_info = (chapter_info_t *)xine_xmalloc(sizeof(chapter_info_t)); + this->chapter_info = (chapter_info_t *)calloc(1, sizeof(chapter_info_t)); this->chapter_info->current_chapter = -1; } this->chapter_info->max_chapter = chapter_no; @@ -2026,7 +2026,7 @@ static demux_plugin_t *anx_open_plugin ( * if we reach this point, the input has been accepted. */ - this = xine_xmalloc (sizeof (demux_ogg_t)); + this = calloc(1, sizeof(demux_ogg_t)); memset (this, 0, sizeof(demux_ogg_t)); this->stream = stream; this->input = input; @@ -2072,7 +2072,7 @@ static demux_plugin_t *ogg_open_plugin ( * if we reach this point, the input has been accepted. */ - this = xine_xmalloc (sizeof (demux_ogg_t)); + this = calloc(1, sizeof(demux_ogg_t)); memset (this, 0, sizeof(demux_ogg_t)); this->stream = stream; this->input = input; @@ -2135,7 +2135,7 @@ static void *anx_init_class (xine_t *xin static void *anx_init_class (xine_t *xine, void *data) { demux_anx_class_t *this; - this = xine_xmalloc (sizeof (demux_anx_class_t)); + this = calloc(1, sizeof(demux_anx_class_t)); this->demux_class.open_plugin = anx_open_plugin; this->demux_class.get_description = anx_get_description; @@ -2184,7 +2184,7 @@ static void *ogg_init_class (xine_t *xin static void *ogg_init_class (xine_t *xine, void *data) { demux_ogg_class_t *this; - this = xine_xmalloc (sizeof (demux_ogg_class_t)); + this = calloc(1, sizeof(demux_ogg_class_t)); this->demux_class.open_plugin = ogg_open_plugin; this->demux_class.get_description = ogg_get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_pva.c --- a/src/demuxers/demux_pva.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_pva.c Wed May 07 17:10:08 2008 +0200 @@ -430,7 +430,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_pva_t)); + this = calloc(1, sizeof(demux_pva_t)); this->stream = stream; this->input = input; @@ -503,7 +503,7 @@ static void *init_plugin (xine_t *xine, static void *init_plugin (xine_t *xine, void *data) { demux_pva_class_t *this; - this = xine_xmalloc (sizeof (demux_pva_class_t)); + this = calloc(1, sizeof(demux_pva_class_t)); this->demux_class.open_plugin = open_plugin; this->demux_class.get_description = get_description; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_qt.c --- a/src/demuxers/demux_qt.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_qt.c Wed May 07 17:10:08 2008 +0200 @@ -581,7 +581,7 @@ static qt_info *create_qt_info(void) { static qt_info *create_qt_info(void) { qt_info *info; - info = (qt_info *)xine_xmalloc(sizeof(qt_info)); + info = (qt_info *)calloc(1, sizeof(qt_info)); if (!info) return NULL; @@ -2981,7 +2981,7 @@ static demux_plugin_t *open_plugin (demu return NULL; } - this = xine_xmalloc (sizeof (demux_qt_t)); + this = calloc(1, sizeof(demux_qt_t)); this->stream = stream; this->input = input; @@ -3110,7 +3110,7 @@ static void *init_plugin (xine_t *xine, demux_qt_class_t *this; - this = xine_xmalloc (sizeof (demux_qt_class_t)); + this = calloc(1, sizeof(demux_qt_class_t)); this->config = xine->config; this->xine = xine; diff -r 2fadc829b90d3d18ba25c27c1617059ac49aa6ae -r 21ece21813e8eb8b4ff984bc8262488cc002e55f src/demuxers/demux_rawdv.c --- a/src/demuxers/demux_rawdv.c Wed May 07 16:59:00 2008 +0200 +++ b/src/demuxers/demux_rawdv.c Wed May 07 17:10:08 2008 +0200 @@ -347,7 +347,7 @@ static demux_plugin_t *open_plugin (demu demux_raw_dv_t *this; - this = xine_xmalloc (sizeof (demux_raw_dv_t)); + this = calloc(1, sizeof(demux_raw_dv_t)); this->stream = strea... [truncated message content] |