mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 15:08:53 +00:00
Only keep the video RTP structure around if 1. Video support is enabled and 2. A video codec is enabled on the dialog
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2561,7 +2561,7 @@ static int create_addr_from_peer(struct sip_pvt *dialog, struct sip_peer *peer)
|
|||||||
ast_copy_flags(&dialog->flags[0], &peer->flags[0], SIP_FLAGS_TO_COPY);
|
ast_copy_flags(&dialog->flags[0], &peer->flags[0], SIP_FLAGS_TO_COPY);
|
||||||
ast_copy_flags(&dialog->flags[1], &peer->flags[1], SIP_PAGE2_FLAGS_TO_COPY);
|
ast_copy_flags(&dialog->flags[1], &peer->flags[1], SIP_PAGE2_FLAGS_TO_COPY);
|
||||||
dialog->capability = peer->capability;
|
dialog->capability = peer->capability;
|
||||||
if (!ast_test_flag(&dialog->flags[1], SIP_PAGE2_VIDEOSUPPORT) && dialog->vrtp) {
|
if ((!ast_test_flag(&dialog->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(dialog->capability & AST_FORMAT_VIDEO_MASK)) && dialog->vrtp) {
|
||||||
ast_rtp_destroy(dialog->vrtp);
|
ast_rtp_destroy(dialog->vrtp);
|
||||||
dialog->vrtp = NULL;
|
dialog->vrtp = NULL;
|
||||||
}
|
}
|
||||||
@@ -8945,7 +8945,7 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ
|
|||||||
p->t38.jointcapability &= p->t38.peercapability;
|
p->t38.jointcapability &= p->t38.peercapability;
|
||||||
p->maxcallbitrate = user->maxcallbitrate;
|
p->maxcallbitrate = user->maxcallbitrate;
|
||||||
/* If we do not support video, remove video from call structure */
|
/* If we do not support video, remove video from call structure */
|
||||||
if (!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) && p->vrtp) {
|
if ((!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(p->capability & AST_FORMAT_VIDEO_MASK)) && p->vrtp) {
|
||||||
ast_rtp_destroy(p->vrtp);
|
ast_rtp_destroy(p->vrtp);
|
||||||
p->vrtp = NULL;
|
p->vrtp = NULL;
|
||||||
}
|
}
|
||||||
@@ -9065,7 +9065,7 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ
|
|||||||
if (p->peercapability)
|
if (p->peercapability)
|
||||||
p->jointcapability &= p->peercapability;
|
p->jointcapability &= p->peercapability;
|
||||||
p->maxcallbitrate = peer->maxcallbitrate;
|
p->maxcallbitrate = peer->maxcallbitrate;
|
||||||
if (!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) && p->vrtp) {
|
if ((!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(p->capability & AST_FORMAT_VIDEO_MASK)) && p->vrtp) {
|
||||||
ast_rtp_destroy(p->vrtp);
|
ast_rtp_destroy(p->vrtp);
|
||||||
p->vrtp = NULL;
|
p->vrtp = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user