aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h245
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-04-14 20:48:37 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-04-14 20:48:37 +0000
commit83ce037aa9e329b4ee677292dd0be07d7526fa39 (patch)
treeb676e612489495f7831efd0de87fcb0100828c0e /asn1/h245
parentb09f79f4141b403353c4afb2680739b7670d3045 (diff)
Use the sample rate from SDP info in RTP stream analysis.
svn path=/trunk/; revision=32466
Diffstat (limited to 'asn1/h245')
-rw-r--r--asn1/h245/packet-h245-template.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index e6fb0b9f8f..6aa63d8ba3 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -323,6 +323,13 @@ static void update_unicast_addr(unicast_addr_t *req_addr, unicast_addr_t *ack_ad
}
}
+static void free_encoding_name_str (encoding_name_and_rate_t *encoding_name_and_rate)
+{
+ if (encoding_name_and_rate->encoding_name) {
+ g_free(encoding_name_and_rate->encoding_name);
+ }
+}
+
static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_channel_lcl)
{
gint *key;
@@ -343,10 +350,13 @@ static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_cha
/* (S)RTP, (S)RTCP */
if (upcoming_channel_lcl->rfc2198 > 0) {
- rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free);
+ encoding_name_and_rate_t *encoding_name_and_rate = g_malloc( sizeof(encoding_name_and_rate_t));
+ rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, free_encoding_name_str);
+ encoding_name_and_rate->encoding_name = g_strdup("red");
+ encoding_name_and_rate->sample_rate = 8000;
key = g_malloc(sizeof(gint));
*key = upcoming_channel_lcl->rfc2198;
- g_hash_table_insert(rtp_dyn_payload, key, g_strdup("red"));
+ g_hash_table_insert(rtp_dyn_payload, key, encoding_name_and_rate);
}
if (upcoming_channel_lcl->srtp_flag) {