linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] oRTP source code misunderstanding


From: Vitold S
Subject: [Linphone-developers] oRTP source code misunderstanding
Date: Fri, 15 Nov 2019 18:57:47 +0300

Dear Linphone developer,

I review oRTP source code and unable to understand https://github.com/BelledonneCommunications/ortp/blob/master/src/rtpparse.c#L57

```
    /* make some checks: q size must not exceed RtpStream::max_rq_size */
    while (q->q_mcount > maxrqsz)
    {
        /* remove the oldest mblk_t */
        tmp=getq(q);
        if (mp!=NULL)
        {
            ortp_warning("rtp_putq: Queue is full. Discarding message with ts=%u",((rtp_header_t*)mp->b_rptr)->timestamp);
            freemsg(tmp);
            (*discarded)++;
        }
    }
```

Could you please explain why you ask tmp value and check mp pointer in next if construction?

P.S. I will be happy when you open issue in GitHUB to make communication more powerful.

Thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]