Fix multistream packet corruption, implement GET_FINAL_RANGE for multistream, and...
authorGregory Maxwell <greg@xiph.org>
Sun, 30 Oct 2011 23:57:22 +0000 (19:57 -0400)
committerGregory Maxwell <greg@xiph.org>
Sun, 30 Oct 2011 23:57:22 +0000 (19:57 -0400)
commitafd05aca0cdb2cd4b530d00cbb823ecc148b5780
treea9546eda5b3330d1a7818fadfb063cfab8e335f5
parentb77c44b46f46810ae9af3a1b88d361f1daeb769b
Fix multistream packet corruption, implement GET_FINAL_RANGE for multistream, and add many tests.

Multistream encode was failing to add the length of the extra length for
self-delimited packets causing corrupted output. Multistream decode was
not properly handling lost frames (and potentially reading out of bounds
as a result).

GET_FINAL_RANGE has been implemented as the xor of the final range of all
the streams in the packet.

test_opus_encode now does the mono narrowband tests using dual-mono
multistream.
src/opus_multistream.c
src/repacketizer.c
tests/test_opus_api.c
tests/test_opus_encode.c