res_pjsip_sdp_rtp: Fix return code from apply_negotiated_sdp_stream
authorGeorge Joseph <gjoseph@digium.com>
Wed, 30 Jan 2019 19:25:55 +0000 (12:25 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 28 Feb 2019 17:35:53 +0000 (11:35 -0600)
commit8f9ffe5905a0b34a13cba772262d06382a3991c6
tree3d2c7732c1c5ef8777e87798005093de7217e200
parent47745fa1c97dd3d7996a7514d8a3e84dcfb97f46
res_pjsip_sdp_rtp:  Fix return code from apply_negotiated_sdp_stream

apply_negotiated_sdp_stream was returning a "1" when no joint
capabilities were found on an outgoing call instead of a "-1".
This indicated to res_pjsip_session that the handler DID handle
the sdp when in fact it didn't.  Without the appropriate setup,
a subsequent media frame coming in would have an invalid stream_num
and cause a seg fault when the stream was attempted to be retrieved.

apply_negotiated_sdp_stream now returns the correct "-1" and any
media is now discarded before it reaches the core stream processing.

ASTERISK-28260
Reported by: Sotiris Ganouris

Change-Id: Ia095cb16b4862f2f6ad6d2d2a77453fa2542371f
res/res_pjsip_sdp_rtp.c