[opus] The codec can not support multi-thread ?

Jean-Marc Valin jmvalin at jmvalin.ca
Fri Oct 18 19:55:44 PDT 2013


There are two ways to have thread issues with Opus:

1) You are defining NONTHREADSAFE_PSEUDOSTACK in the build. As the name
implies, this results in a non-threadsafe library.

2) You are reusing the same encoder/decoder state from two threads
simultaneously (which doesn't make sense since each stream needs its own
state).

The Opus library does not use any global state (except for case 1
above), so there cannot be any re-entrance issue.

Cheers,

	Jean-Marc

On 10/17/2013 11:36 PM, qian pei wrote:
> We used opus-codec for a VOIP gateway. The GW is running at a UBUNTU server.
> The opus stream is transcoded to G711 pcmu stream.So there are many opus
> codecs running simultaneously.
> We noticed that if there more than 5 streams in. the voice then has
> notisable glitchs.More streams in, worse voice got.
> 
> Then we write test code for opus-codec which encode a .pcm file
> simultaneously. and get error.
> we also write decoder test code. error too. We tested v1.0.2 and 1.0.3,
> Our codec is a .so file, our main program is written in erlang.
> 
> we used other codecs such as isac/ilbc/... they are OK. you may try
> lwork.hk:8086 <http://lwork.hk:8086>, it is a webRTC demo.
> 
> so, anybody noticed this? It seems to be a re-entry bug.
> 
> 
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus
> 



More information about the opus mailing list