summaryrefslogtreecommitdiff
path: root/libavcodec/opusdec.c
diff options
context:
space:
mode:
authorKieran Kunhya <kierank@obe.tv>2015-10-28 17:01:56 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-10-28 17:57:07 +0100
commitb8deb7c34f755d5e3eee0b5930c3a6ad2dda96bc (patch)
treea2b59c62d174502b31197948cc3db8e2b074dc36 /libavcodec/opusdec.c
parent6dcd82290438eb810936de4febd0558b38a08ec5 (diff)
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
Diffstat (limited to 'libavcodec/opusdec.c')
-rw-r--r--libavcodec/opusdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index 919e5e3303..92e651c787 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -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));