From: Diego 'F. P. <fla...@gm...> - 2008-04-18 23:57:34
|
# HG changeset patch # User Diego 'Flameeyes' Pettenò <fla...@gm...> # Date 1208562851 -7200 # Node ID fa5398bfd312521bea5cb8097d864da578943325 # Parent 18e72360074d655db28b7325e4f81dc9a872905b Replace xine_xcalloc usage with calloc, for the revisions transplanted from 1.2 series. diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/demuxers/demux_real.c --- a/src/demuxers/demux_real.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/demuxers/demux_real.c Tue Dec 18 22:45:28 2007 +0100 @@ -769,7 +769,7 @@ unknown: this->video_stream->mdpr->avg_bit_rate); /* Allocate fragment offset table */ - this->fragment_tab = xine_xcalloc(FRAGMENT_TAB_SIZE, sizeof(uint32_t)); + this->fragment_tab = calloc(FRAGMENT_TAB_SIZE, sizeof(uint32_t)); this->fragment_tab_max = FRAGMENT_TAB_SIZE; } @@ -1386,7 +1386,7 @@ static int demux_real_send_chunk(demux_p frames = (stream_read_word(this) & 0xf0) >> 4; /* 2 bytes per frame size */ - sizes = xine_xcalloc(frames, sizeof(int)); + sizes = calloc(frames, sizeof(int)); for(i = 0; i < frames; i++) sizes[i] = stream_read_word(this); diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/input/input_cdda.c --- a/src/input/input_cdda.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/input/input_cdda.c Tue Dec 18 22:45:28 2007 +0100 @@ -2453,7 +2453,7 @@ static int cdda_plugin_open (input_plugi if(this->cddb.num_tracks) { int t; - this->cddb.track = (trackinfo_t *) xine_xcalloc(this->cddb.num_tracks, sizeof(trackinfo_t)); + this->cddb.track = (trackinfo_t *) calloc(this->cddb.num_tracks, sizeof(trackinfo_t)); for(t = 0; t < this->cddb.num_tracks; t++) { int length = (toc->toc_entries[t].first_frame_minute * CD_SECONDS_PER_MINUTE + diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/input/input_dvd.c --- a/src/input/input_dvd.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/input/input_dvd.c Tue Dec 18 22:45:28 2007 +0100 @@ -1632,7 +1632,7 @@ static input_plugin_t *dvd_class_get_ins this->mem_stack = 0; this->mem_stack_max = 1024; - this->mem = xine_xcalloc(this->mem_stack_max, sizeof(unsigned char *)); + this->mem = calloc(this->mem_stack_max, sizeof(unsigned char *)); if (!this->mem) { free(this); return NULL; diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/input/input_file.c --- a/src/input/input_file.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/input/input_file.c Tue Dec 18 22:45:28 2007 +0100 @@ -689,9 +689,9 @@ static xine_mrl_t **file_class_get_dir ( return NULL; } - dir_files = (xine_mrl_t *) xine_xcalloc(MAXFILES, sizeof(xine_mrl_t)); - hide_files = (xine_mrl_t *) xine_xcalloc(MAXFILES, sizeof(xine_mrl_t)); - norm_files = (xine_mrl_t *) xine_xcalloc(MAXFILES, sizeof(xine_mrl_t)); + dir_files = (xine_mrl_t *) calloc(MAXFILES, sizeof(xine_mrl_t)); + hide_files = (xine_mrl_t *) calloc(MAXFILES, sizeof(xine_mrl_t)); + norm_files = (xine_mrl_t *) calloc(MAXFILES, sizeof(xine_mrl_t)); while((pdirent = readdir(pdir)) != NULL) { diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/input/input_smb.c --- a/src/input/input_smb.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/input/input_smb.c Tue Dec 18 22:45:28 2007 +0100 @@ -256,8 +256,8 @@ static xine_mrl_t **smb_class_get_dir (i } if ((dir = smbc_opendir(current_path_smb)) >= 0){ - xine_mrl_t *dir_files = (xine_mrl_t *) xine_xcalloc(MAXFILES, sizeof(xine_mrl_t)); - xine_mrl_t *norm_files = (xine_mrl_t *) xine_xcalloc(MAXFILES, sizeof(xine_mrl_t)); + xine_mrl_t *dir_files = (xine_mrl_t *) calloc(MAXFILES, sizeof(xine_mrl_t)); + xine_mrl_t *norm_files = (xine_mrl_t *) calloc(MAXFILES, sizeof(xine_mrl_t)); int num_dir_files=0; int num_norm_files=0; while ((pdirent = smbc_readdir(dir)) != NULL){ diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/input/libreal/real.c --- a/src/input/libreal/real.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/input/libreal/real.c Tue Dec 18 22:45:28 2007 +0100 @@ -458,7 +458,7 @@ rmff_header_t *real_parse_sdp(char *data desc->copyright, desc->abstract); header->data=rmff_new_dataheader(0,0); - header->streams = xine_xcalloc((desc->stream_count+1), sizeof(rmff_mdpr_t*)); + header->streams = calloc((desc->stream_count+1), sizeof(rmff_mdpr_t*)); lprintf("number of streams: %u\n", desc->stream_count); for (i=0; i<desc->stream_count; i++) { diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/libxinevdec/bitplane.c --- a/src/libxinevdec/bitplane.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/libxinevdec/bitplane.c Tue Dec 18 22:45:28 2007 +0100 @@ -1158,8 +1158,8 @@ static void bitplane_decode_data (video_ this->bytes_per_pixel = 1; /* New Buffer for indexes (palette based formats) */ - this->index_buf = xine_xcalloc( this->num_pixel, this->bytes_per_pixel ); - this->index_buf_hist = xine_xcalloc( this->num_pixel, this->bytes_per_pixel ); + this->index_buf = calloc( this->num_pixel, this->bytes_per_pixel ); + this->index_buf_hist = calloc( this->num_pixel, this->bytes_per_pixel ); this->num_bitplanes = bih->biPlanes; this->camg_mode = bih->biCompression; @@ -1314,8 +1314,8 @@ static void bitplane_decode_data (video_ } } if( this->index_buf == NULL ) { - this->index_buf = xine_xcalloc( this->num_pixel, this->bytes_per_pixel ); - this->index_buf_hist = xine_xcalloc( this->num_pixel, this->bytes_per_pixel ); + this->index_buf = calloc( this->num_pixel, this->bytes_per_pixel ); + this->index_buf_hist = calloc( this->num_pixel, this->bytes_per_pixel ); for (i = 0; i < (this->num_pixel * this->bytes_per_pixel); i++) { this->index_buf[i] = 0; this->index_buf_hist[i] = 0; diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/post/mosaico/mosaico.c --- a/src/post/mosaico/mosaico.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/post/mosaico/mosaico.c Tue Dec 18 22:45:28 2007 +0100 @@ -158,7 +158,7 @@ static post_plugin_t *mosaico_open_plugi _x_post_init(&this->post, 0, inputs); - this->pip = (mosaico_pip_t *)xine_xcalloc((inputs - 1), sizeof(mosaico_pip_t)); + this->pip = (mosaico_pip_t *)calloc((inputs - 1), sizeof(mosaico_pip_t)); this->pip_count = inputs - 1; pthread_cond_init(&this->vpts_limit_changed, NULL); diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/video_out/video_out_fb.c --- a/src/video_out/video_out_fb.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/video_out/video_out_fb.c Tue Dec 18 22:45:28 2007 +0100 @@ -338,7 +338,7 @@ static void frame_reallocate(fb_driver_t else { free(frame->data); - frame->data = xine_xcalloc(frame->sc.output_width * + frame->data = calloc(frame->sc.output_width * frame->sc.output_height, this->bytes_per_pixel); } diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/video_out/video_out_xshm.c --- a/src/video_out/video_out_xshm.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/video_out/video_out_xshm.c Tue Dec 18 22:45:28 2007 +0100 @@ -276,7 +276,7 @@ static XImage *create_ximage (xshm_drive this->bytes_per_pixel = this->bpp / 8; this->image_byte_order = myimage->byte_order; - myimage->data = xine_xcalloc (width * height, this->bytes_per_pixel); + myimage->data = calloc (width * height, this->bytes_per_pixel); } return myimage; diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/xine-engine/load_plugins.c --- a/src/xine-engine/load_plugins.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/xine-engine/load_plugins.c Tue Dec 18 22:45:28 2007 +0100 @@ -945,7 +945,7 @@ static void load_plugin_list(FILE *fp, x file = xine_xmalloc(sizeof(plugin_file_t)); node->file = file; file->filename = strdup(line+1); - node->info = xine_xcalloc(2, sizeof(plugin_info_t)); + node->info = calloc(2, sizeof(plugin_info_t)); node->info[1].type = PLUGIN_NONE; decoder_info = NULL; vo_info = NULL; @@ -1029,7 +1029,7 @@ static void load_plugin_list(FILE *fp, x for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) { s = strchr(s+1, ' '); } - decoder_info->supported_types = xine_xcalloc((i+1), sizeof(uint32_t)); + decoder_info->supported_types = calloc((i+1), sizeof(uint32_t)); for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) { decoder_info->supported_types[i] = lu; s = strchr(s+1, ' '); diff -r fa5398bfd312521bea5cb8097d864da578943325 -r 18e72360074d655db28b7325e4f81dc9a872905b src/xine-engine/scratch.c --- a/src/xine-engine/scratch.c Sat Apr 19 01:54:11 2008 +0200 +++ b/src/xine-engine/scratch.c Tue Dec 18 22:45:28 2007 +0100 @@ -109,8 +109,8 @@ scratch_buffer_t *_x_new_scratch_buffer this = xine_xmalloc (sizeof (scratch_buffer_t)); - this->lines = xine_xcalloc ((num_lines + 1), sizeof(char*)); - this->ordered = xine_xcalloc ((num_lines + 1), sizeof(char*)); + this->lines = calloc ((num_lines + 1), sizeof(char*)); + this->ordered = calloc ((num_lines + 1), sizeof(char*)); this->scratch_printf = scratch_printf; this->get_content = scratch_get_content; |