[ previous ] [ next ] [ threads ]
 To :  "yate@v..." <yate@v...>
 From :  Vincent <vincent1941@g...>
 Subject :  RTPGroup problems.
 Date :  Sat, 28 Dec 2013 10:32:03 +0800
Hello,

I meet a crash problem maybe related to RTPGroup. I find the code below and
can not understand.

 // we MUST NOT reference count here as RTPGroup will crash if we remove
 // any RTPProcessor from its own thread

Can anyone give some explain about it? (why can not use reference count
here)

bool YRTPSession::rtpRecvData(bool marker, unsigned int timestamp, const
void* data, int len)
{
    s_srcMutex.lock();
    YRTPSource* source = m_wrap ? m_wrap->m_source : 0;
    // we MUST NOT reference count here as RTPGroup will crash if we remove
    // any RTPProcessor from its own thread
    if (source) {
if (source->alive())
    source->busy(true);
else
    source = 0;
    }
    s_srcMutex.unlock();
    if (!source)
return false;


Regards,
Vincent



Hello,

I meet a crash problem maybe related to RTPGroup. I find the code below and can not understand.

 // we MUST NOT reference count here as RTPGroup will crash if we remove
 // any RTPProcessor from its own thread

Can anyone give some explain about it? (why can not use reference count here)

bool YRTPSession::rtpRecvData(bool marker, unsigned int timestamp, const void* data, int len)
{
    s_srcMutex.lock();
    YRTPSource* source = m_wrap ? m_wrap->m_source : 0;
    // we MUST NOT reference count here as RTPGroup will crash if we remove
    // any RTPProcessor from its own thread
    if (source) {
if (source->alive())
   source->busy(true);
else
   source = 0;
    }
    s_srcMutex.unlock();
    if (!source)
return false;


Regards,
Vincent