[FFmpeg-cvslog] Fix ticket21, temporary audio array was too small.

Michael Niedermayer git at videolan.org
Sat Apr 9 01:37:26 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr  9 01:00:44 2011 +0200| [a61bc91d42945e6ccefef4867ef32d2073f8f8c7] | committer: Michael Niedermayer

Fix ticket21, temporary audio array was too small.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a61bc91d42945e6ccefef4867ef32d2073f8f8c7
---

 libavcodec/resample.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index 45fba69..ed2b31b 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -274,7 +274,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
         input  = s->buffer[0];
     }
 
-    lenout= 4*nb_samples * s->ratio + 16;
+    lenout= 2*s->output_channels*nb_samples * s->ratio + 16;
 
     if (s->sample_fmt[1] != AV_SAMPLE_FMT_S16) {
         output_bak = output;



More information about the ffmpeg-cvslog mailing list