Browse Source

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>
tags/n0.11
Reimar Döffinger Martin Storsjö 13 years ago
parent
commit
439c3d5bcc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/nellymoserenc.c

+ 1
- 1
libavcodec/nellymoserenc.c View File

@@ -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;


Loading…
Cancel
Save