pjmedia RTP session status flags are overridden

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

 



Hi,

I’m using PJSIP version 2.6 and tried to check if the SSRC has changed of the stream. But the RTP status flag badssrc was never set, because the status and all prev. set flags are overridden by calling the function pjmedia_rtp_seq_update() in pjmedia_rtp_session_update2(). I suppose this behavior isn’t intended.

I fixed it with the attached patch.

br, Karl
Index: pjmedia/src/pjmedia/rtcp.c
===================================================================
--- pjmedia/src/pjmedia/rtcp.c	(revision 5561)
+++ pjmedia/src/pjmedia/rtcp.c	(working copy)
@@ -292,6 +292,9 @@
     PJ_UNUSED_ARG(discarded);
 #endif
 
+    /* Init status */
+    seq_st.status.value = 0;
+
     if (sess->stat.rx.pkt == 0) {
 	/* Init sequence for the first time. */
 	pjmedia_rtp_seq_init(&sess->seq_ctrl, (pj_uint16_t)seq);
Index: pjmedia/src/pjmedia/rtp.c
===================================================================
--- pjmedia/src/pjmedia/rtp.c	(revision 5561)
+++ pjmedia/src/pjmedia/rtp.c	(working copy)
@@ -301,7 +301,11 @@
     pjmedia_rtp_status st;
     
     /* Init status */
-    st.status.value = 0;
+    if (seq_status)
+	st.status.value = seq_status->status.value;
+    else
+	st.status.value = 0;
+
     st.diff = 0;
 
     /*
_______________________________________________
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