aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cngdec.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-10-30 12:17:35 +0200
committerMartin Storsjö <martin@martin.st>2012-10-30 16:51:16 +0200
commitcafefd889b9e9f36814dc4ca13ed169f667b41a4 (patch)
tree4daf680ca6ad234b31c9442acbc72b4a47ddea91 /libavcodec/cngdec.c
parent9b50d20cd24c0a91bace9d651e2d0fd1e91db3c9 (diff)
downloadffmpeg-cafefd889b9e9f36814dc4ca13ed169f667b41a4.tar.gz
cngdec: Fix the memset size to cover the full array
This was a leftover from previous iterations of the code, where the refl coef arrays were statically allocated. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/cngdec.c')
-rw-r--r--libavcodec/cngdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
index 8cfe9cfdbd..c05bfd9578 100644
--- a/libavcodec/cngdec.c
+++ b/libavcodec/cngdec.c
@@ -108,7 +108,7 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
if (avpkt->size) {
float dbov = -avpkt->data[0] / 10.0;
p->target_energy = 1081109975 * pow(10, dbov) * 0.75;
- memset(p->target_refl_coef, 0, sizeof(p->refl_coef));
+ memset(p->target_refl_coef, 0, p->order * sizeof(*p->target_refl_coef));
for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
}