[opus] Regarding error handling in Opus Decoder

Ralph Giles giles at thaumas.net
Sat Oct 5 23:21:09 PDT 2013

On 2013-10-04 1:34 PM, Rhishikesh Agashe wrote:

> I believe that it should reject the erroneous payload and start decoding
> the next payload for it to work properly in a streaming environment.

Because the decoder's predictor state converges over multiple packets of
data, you cannot just skip to the next payload without introducing
decoding errors.

We have also tried to make the reference implementation strict to help
dectect data corruption bugs during deployment.

Thus, stopping the decoder on corrupt data is the expected behaviour.

How are you encountering these conditions?

'Invalid Payload Length' and especially 'Range coder state mismatch'
indicate either corrupt data for a decoder bug. Corrupt packets should
be detected and discarded by the network layer, in which case you can
use the packet loss concealment and/or forward error correction support
to minimize the damage.


More information about the opus mailing list