Don't update null data pointer after each multistream decoder
authorFelicia Lim <flim@google.com>
Tue, 3 Dec 2019 00:37:14 +0000 (16:37 -0800)
committerFelicia Lim <flim@google.com>
Tue, 3 Dec 2019 17:32:43 +0000 (09:32 -0800)
The data pointer could be null in the case of DTX or packet loss.

src/opus_multistream_decoder.c

index 0018517..a2837c3 100644 (file)
@@ -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;