diff options
Diffstat (limited to 'epan/dissectors/packet-applemidi.c')
-rw-r--r-- | epan/dissectors/packet-applemidi.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/epan/dissectors/packet-applemidi.c b/epan/dissectors/packet-applemidi.c index 750dac641f..21443e4767 100644 --- a/epan/dissectors/packet-applemidi.c +++ b/epan/dissectors/packet-applemidi.c @@ -285,9 +285,7 @@ dissect_applemidi_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi guint16 command; conversation_t *p_conv; /*struct _rtp_conversation_info *p_conv_data = NULL;*/ - encoding_name_and_rate_t *encoding_name_and_rate = NULL; - GHashTable *rtp_dyn_payload = NULL; - gint *key; + rtp_dyn_payload_t *rtp_dyn_payload = NULL; if ( tvb_length( tvb ) < 4) return FALSE; /* not enough bytes to check */ @@ -299,13 +297,8 @@ dissect_applemidi_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi /* set dynamic payload-type 97 which is used by Apple for their RTP-MIDI implementation for this address/port-tuple to cause RTP-dissector to call the RTP-MIDI-dissector for payload-decoding */ - encoding_name_and_rate = wmem_new(wmem_file_scope(), encoding_name_and_rate_t); - rtp_dyn_payload = g_hash_table_new( g_int_hash, g_int_equal ); - encoding_name_and_rate->encoding_name = wmem_strdup( wmem_file_scope(), "rtp-midi" ); - encoding_name_and_rate->sample_rate = 10000; - key = wmem_new(wmem_file_scope(), gint); - *key = 97; - g_hash_table_insert( rtp_dyn_payload, key, encoding_name_and_rate ); + rtp_dyn_payload = rtp_dyn_payload_new(); + rtp_dyn_payload_insert(rtp_dyn_payload, 97, "rtp-midi", 10000); rtp_add_address( pinfo, &pinfo->src, pinfo->srcport, 0, APPLEMIDI_DISSECTOR_SHORTNAME, pinfo->fd->num, FALSE, rtp_dyn_payload); |