comparison resample.c @ 5502:f64d8abf92e0 libavcodec

make output buffer larger so drift compensation can work
author michael
date Mon, 06 Aug 2007 23:34:41 +0000
parents 45d083bbbbe7
children ed05a3d964fa
comparison
equal deleted inserted replaced
5501:a0dcb5a51409 5502:f64d8abf92e0
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)(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]= (short*) av_malloc( lenout * sizeof(short) );
196 bufout[1]= (short*) av_malloc( lenout * sizeof(short) ); 196 bufout[1]= (short*) 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) {