Browse Source

opus: Do not call vector_fmul_scalar on zero samples

The x86 variant of this function crashes in that specific case.

CC: libav-devel@libav.org
tags/n3.0
Kieran Kunhya Luca Barbato 10 years ago
parent
commit
b8deb7c34f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/opusdec.c

+ 1
- 1
libavcodec/opusdec.c View File

@@ -587,7 +587,7 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data,
memset(frame->extended_data[i], 0, frame->linesize[0]);
}

if (c->gain_i) {
if (c->gain_i && decoded_samples > 0) {
c->fdsp.vector_fmul_scalar((float*)frame->extended_data[i],
(float*)frame->extended_data[i],
c->gain, FFALIGN(decoded_samples, 8));


Loading…
Cancel
Save