From 8493bf50892be0e902a354444747e6d14f2a6a10 Mon Sep 17 00:00:00 2001 From: Felicia Lim Date: Mon, 2 Dec 2019 16:37:14 -0800 Subject: Don't update null data pointer after each multistream decoder The data pointer could be null in the case of DTX or packet loss. --- src/opus_multistream_decoder.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/opus_multistream_decoder.c b/src/opus_multistream_decoder.c index 0018517a..a2837c35 100644 --- a/src/opus_multistream_decoder.c +++ b/src/opus_multistream_decoder.c @@ -251,8 +251,11 @@ int opus_multistream_decode_native( } packet_offset = 0; ret = opus_decode_native(dec, data, len, buf, frame_size, decode_fec, s!=st->layout.nb_streams-1, &packet_offset, soft_clip); - data += packet_offset; - len -= packet_offset; + if (!do_plc) + { + data += packet_offset; + len -= packet_offset; + } if (ret <= 0) { RESTORE_STACK; -- cgit v1.2.1