comparison resample.c @ 5958:ed05a3d964fa libavcodec

stupid code (casting of void*) found by checktree.sh
author michael
date Sat, 01 Dec 2007 00:19:44 +0000
parents f64d8abf92e0
children 7d242886f17b
comparison
equal deleted inserted replaced
5957:0f2c4fa2c4f2 5958:ed05a3d964fa
183 return nb_samples; 183 return nb_samples;
184 } 184 }
185 185
186 /* XXX: move those malloc to resample init code */ 186 /* XXX: move those malloc to resample init code */
187 for(i=0; i<s->filter_channels; i++){ 187 for(i=0; i<s->filter_channels; i++){
188 bufin[i]= (short*) av_malloc( (nb_samples + s->temp_len) * sizeof(short) ); 188 bufin[i]= av_malloc( (nb_samples + s->temp_len) * sizeof(short) );
189 memcpy(bufin[i], s->temp[i], s->temp_len * sizeof(short)); 189 memcpy(bufin[i], s->temp[i], s->temp_len * sizeof(short));
190 buftmp2[i] = bufin[i] + s->temp_len; 190 buftmp2[i] = bufin[i] + s->temp_len;
191 } 191 }
192 192
193 /* make some zoom to avoid round pb */ 193 /* make some zoom to avoid round pb */
194 lenout= (int)(4*nb_samples * s->ratio) + 16; 194 lenout= (int)(4*nb_samples * s->ratio) + 16;
195 bufout[0]= (short*) av_malloc( lenout * sizeof(short) ); 195 bufout[0]= av_malloc( lenout * sizeof(short) );
196 bufout[1]= (short*) av_malloc( lenout * sizeof(short) ); 196 bufout[1]= av_malloc( lenout * sizeof(short) );
197 197
198 if (s->input_channels == 2 && 198 if (s->input_channels == 2 &&
199 s->output_channels == 1) { 199 s->output_channels == 1) {
200 buftmp3[0] = output; 200 buftmp3[0] = output;
201 stereo_to_mono(buftmp2[0], input, nb_samples); 201 stereo_to_mono(buftmp2[0], input, nb_samples);