From 6810884f600d4d2c79c23ae72031a89be47203c1 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 24 Jul 2006 03:42:27 +0000 Subject: [PATCH] Only deal with getting the supported payloads on audio if an audio RTP stream exists git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38139 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 07ce40df68..5231b46b80 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4447,7 +4447,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) int old = 0; /* Peer capability is the capability in the SDP, non codec is RFC2833 DTMF (101) */ - int peercapability, peernoncodeccapability; + int peercapability = 0, peernoncodeccapability = 0; int vpeercapability = 0, vpeernoncodeccapability = 0; struct sockaddr_in sin; /*!< media socket address */ struct sockaddr_in vsin; /*!< Video socket address */ @@ -4825,7 +4825,8 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req) } /* Now gather all of the codecs that we are asked for: */ - ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); + if (p->rtp) + ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); if (p->vrtp) ast_rtp_get_current_formats(newvideortp, &vpeercapability, &vpeernoncodeccapability);