aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-10-20 12:04:08 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-10-20 12:04:08 +0000
commit2ac615da82459989bc02f33fd45a464ab42a77b8 (patch)
tree5b6d6cdee1a24a029b58c225e835c326d17b1b28
parent2639c651db17d69af1cf7be368e219579b6fcde5 (diff)
downloadffmpeg-2ac615da82459989bc02f33fd45a464ab42a77b8.tar.gz
10l
Originally committed as revision 3614 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/resample2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c
index 45602331d9..44761825cf 100644
--- a/libavcodec/resample2.c
+++ b/libavcodec/resample2.c
@@ -124,8 +124,8 @@ AVResampleContext *av_resample_init(int out_rate, int in_rate){
c->filter_length= ceil(16.0/factor);
c->filter_bank= av_mallocz(c->filter_length*(PHASE_COUNT+1)*sizeof(short));
av_build_filter(c->filter_bank, factor, c->filter_length, PHASE_COUNT, 1<<FILTER_SHIFT, 1);
- c->filter_bank[c->filter_length*PHASE_COUNT + (c->filter_length-1)/2 + 1]= (1<<FILTER_SHIFT)-1;
- c->filter_bank[c->filter_length*PHASE_COUNT + (c->filter_length-1)/2 + 2]= 1;
+ memcpy(&c->filter_bank[c->filter_length*PHASE_COUNT+1], c->filter_bank, (c->filter_length-1)*sizeof(short));
+ c->filter_bank[c->filter_length*PHASE_COUNT]= c->filter_bank[c->filter_length - 1];
c->src_incr= out_rate;
c->ideal_dst_incr= c->dst_incr= in_rate * PHASE_COUNT;