diff --git a/libavcodec/resample.c b/libavcodec/resample.c index b43b4daa5a..56b7917444 100644 --- a/libavcodec/resample.c +++ b/libavcodec/resample.c @@ -231,8 +231,8 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl ac3_5p1_mux(output, buftmp3[0], buftmp3[1], nb_samples1); } - av_free(bufin[0]); - av_free(bufin[1]); + for(i=0; ifilter_channels; i++) + av_free(bufin[i]); av_free(bufout[0]); av_free(bufout[1]);