summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-01-31 16:28:33 +0000
committerJoshua Colp <jcolp@digium.com>2015-01-31 16:28:33 +0000
commit14a57782a6685a4fb432e18527974188b3f76ecf (patch)
treec5cd3daba1b1e0449c432298fde5d3a26a9e98d8
parent23bb5f6a73ef50bbf813b6d06aa1d7af63b426f6 (diff)
res_format_attr_h264: Fix crash when determining joint capability.
The res_format_attr_h264 module currently incorrectly attempts to copy SPS and PPS information from the wrong attribute. This change fixes that. ASTERISK-24616 #close Reported by: Yura Kocyuba Review: https://reviewboard.asterisk.org/r/4392/ ........ Merged revisions 431521 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--res/res_format_attr_h264.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_format_attr_h264.c b/res/res_format_attr_h264.c
index f41630211..d263a556f 100644
--- a/res/res_format_attr_h264.c
+++ b/res/res_format_attr_h264.c
@@ -153,13 +153,13 @@ static struct ast_format *h264_getjoint(const struct ast_format *format1, const
if (attr1 && !ast_strlen_zero(attr1->SPS)) {
ast_copy_string(attr->SPS, attr1->SPS, sizeof(attr->SPS));
} else if (attr2 && !ast_strlen_zero(attr2->SPS)) {
- ast_copy_string(attr->SPS, attr1->SPS, sizeof(attr->SPS));
+ ast_copy_string(attr->SPS, attr2->SPS, sizeof(attr->SPS));
}
if (attr1 && !ast_strlen_zero(attr1->PPS)) {
ast_copy_string(attr->PPS, attr1->PPS, sizeof(attr->PPS));
} else if (attr2 && !ast_strlen_zero(attr2->PPS)) {
- ast_copy_string(attr->PPS, attr1->PPS, sizeof(attr->PPS));
+ ast_copy_string(attr->PPS, attr2->PPS, sizeof(attr->PPS));
}
return cloned;