Hi, 2009/3/28 Fran?ois Roseberry <frank_pharaoh05 at hotmail.com>: > Hi again, > > When you call pjmedia_port_get_frame() on a port that has received no data > (jitter buffer empty), is it supposed to fail ? > AFAIK, it is up to the port to return fail or return frame typed NONE or generate data (e.g: using PLC). For example stream port, it has the ability to generate audio frame (via PLC or zero fill) or return frame typed NONE, hence it will always return SUCCESS. > Cause in our program, there's a background thread that calls get frame > approximately 30 times per second. The first time it is called there won't > be any data received, and it calls pjmedia_port_get_frame() and it crashes > on a memzero(). And VS doesn't let us debug inside PJSIP to see what's > wrong. In debug mode, you should be able to see the call stack (inside pjsip). > > I want to precise that we use our own codec, the nihil, which is empty and > does nothing, and it works fine for registering to the endpoint and sending > data. If you are using the existing stream port, whenever the codec returns non SUCCESS in decode() & recover(), the stream will return zero fill frame on its get_frame(). Perhaps you can try that in your "null codec". Regards, nanang