projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba24f12
)
nellymoserenc: fix crash due to memsetting the wrong area.
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Fri, 6 Apr 2012 13:26:35 +0000
(15:26 +0200)
committer
Martin Storsjö
<martin@martin.st>
Fri, 6 Apr 2012 18:05:19 +0000
(21:05 +0300)
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/nellymoserenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/nellymoserenc.c
b/libavcodec/nellymoserenc.c
index
39449ca
..
2a12853
100644
(file)
--- 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;