aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ansi_a.c
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 /epan/dissectors/packet-ansi_a.c
parentb09f79f4141b403353c4afb2680739b7670d3045 (diff)
Use the sample rate from SDP info in RTP stream analysis.
svn path=/trunk/; revision=32466
Diffstat (limited to 'epan/dissectors/packet-ansi_a.c')
-rw-r--r--epan/dissectors/packet-ansi_a.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index 6369886c10..b1e77e2703 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -8062,6 +8062,13 @@ elem_a2p_bearer_session(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
/*
* IOS 5 4.2.90
*/
+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 guint8
elem_a2p_bearer_format(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
@@ -8081,7 +8088,7 @@ elem_a2p_bearer_format(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
GHashTable *rtp_dyn_payload;
gint *key;
- rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free);
+ rtp_dyn_payload = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, free_encoding_name_str);
first_assigned_found = FALSE;
@@ -8305,9 +8312,13 @@ elem_a2p_bearer_format(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
format_assigned &&
(first_assigned_found == FALSE))
{
+ encoding_name_and_rate_t *encoding_name_and_rate = g_malloc( sizeof(encoding_name_and_rate_t));
key = (gint *)g_malloc(sizeof(gint));
*key = rtp_payload_type;
- g_hash_table_insert(rtp_dyn_payload, key, g_strdup(mime_type));
+ encoding_name_and_rate->encoding_name = g_strdup(mime_type);
+ /* Assumtion; all pt:s above have a sample rate of 8000 */
+ encoding_name_and_rate->sample_rate = 8000;
+ g_hash_table_insert(rtp_dyn_payload, key, encoding_name_and_rate);
first_assigned_found = TRUE;