Re: RTP-Rx statistic not plausible if decoder is paused

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

 



Feedback would be appreciated.
Thanks a lot in advance.

Regards,
Michael

2017-07-17 13:14 GMT+02:00 Michael Scheiffler <michael@xxxxxxxxxxxxx>:
> Hi there,
>
> I just ran into the following issue:
>
> When disabling the Rx decoder channel of an RTP stream, the statistic
> is incremented just normal as if the packet had been processed.
> The reason is located in line 1668 of pjmedia/src/pjmedia/stream.c.
> When the decoder channel is disabled, a jump to on_return is made
> which calls pjmedia_rtcp_rx_rtp2() and therefore increments the
> counters.
>
> From my point of view, the packets should be treated as discarded and
> therefore the discard variable should be incremented as well.
>
> The following patch would do it:
>
>  pjmedia/src/pjmedia/stream.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c
> index 7636cd7..78cff47 100644
> --- a/pjmedia/src/pjmedia/stream.c
> +++ b/pjmedia/src/pjmedia/stream.c
> @@ -1664,8 +1664,10 @@ static void on_rx_rtp( void *data,
>      }
>
>      /* Ignore the packet if decoder is paused */
> -    if (channel->paused)
> +    if (channel->paused) {
> + stream->rtcp.stat.rx.discard++;
>   goto on_return;
> +    }
>
>      /* Update RTP session (also checks if RTP session can accept
>       * the incoming packet.
>
>
> Please give feedback.
> Thanks in advance.
>
> Regards,
> Michael

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux