aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-04-06 15:26:35 +0200
committerMartin Storsjö <martin@martin.st>2012-04-06 21:05:19 +0300
commit439c3d5bcc4a4560eaf5fd43c6e156e3d9bc42f2 (patch)
tree2cd250f28d1ccff567c0af643b016c2ba140d2c4
parentba24f129824d21aa0f7312e90d0cf5b7fd9cf043 (diff)
downloadffmpeg-439c3d5bcc4a4560eaf5fd43c6e156e3d9bc42f2.tar.gz
nellymoserenc: fix crash due to memsetting the wrong area.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavcodec/nellymoserenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 39449ca046..2a12853e54 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -389,7 +389,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
memcpy(s->buf + NELLY_BUF_LEN, frame->data[0],
frame->nb_samples * sizeof(*s->buf));
if (frame->nb_samples < NELLY_SAMPLES) {
- memset(s->buf + NELLY_BUF_LEN + avctx->frame_size, 0,
+ memset(s->buf + NELLY_BUF_LEN + frame->nb_samples, 0,
(NELLY_SAMPLES - frame->nb_samples) * sizeof(*s->buf));
if (frame->nb_samples >= NELLY_BUF_LEN)
s->last_frame = 1;