diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-06 15:26:35 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-06 19:50:37 +0200 |
commit | e8b1da007e7920a3f86d63cfe3fa7bc258f17dfa (patch) | |
tree | e8180b6e412414ef9457d604bfabe8708a8a5d4b /libavcodec/nellymoserenc.c | |
parent | f36377304215fa4cbf8e5b590ddec53a9ebda06f (diff) | |
download | ffmpeg-e8b1da007e7920a3f86d63cfe3fa7bc258f17dfa.tar.gz |
nellymoserenc: fix crash due to memsetting the wrong area.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/nellymoserenc.c')
-rw-r--r-- | libavcodec/nellymoserenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 59e08848f6..d460ffb026 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; |