aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mpeg-audio.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2007-11-26 23:06:07 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2007-11-26 23:06:07 +0000
commit1cd46ec7be2902fc906bb30e3866abf572899901 (patch)
tree03479cae6d944acccc60f7283099cb88a27c4712 /epan/dissectors/packet-mpeg-audio.c
parent85d12e73b3ecf8612ffc9b016c9fcc86614cee3d (diff)
Get rid of the global data structures populated by wiretap/mpeg-audio but
used by the mpeg-audio dissector: instead keep the data inside the wiretap module and add accessor functions. I think this should fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1677 and anyway it's cleaner. svn path=/trunk/; revision=23612
Diffstat (limited to 'epan/dissectors/packet-mpeg-audio.c')
-rw-r--r--epan/dissectors/packet-mpeg-audio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-mpeg-audio.c b/epan/dissectors/packet-mpeg-audio.c
index 9b33740127..ba5370b631 100644
--- a/epan/dissectors/packet-mpeg-audio.c
+++ b/epan/dissectors/packet-mpeg-audio.c
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-mpeg-audio.c */
-/* ../../tools/asn2wrs.py -p mpeg-audio -c mpeg-audio.cnf -s packet-mpeg-audio-template mpeg-audio.asn */
+/* ../../../tools/asn2wrs.py -p mpeg-audio -c ../../../asn1/mpeg-audio/mpeg-audio.cnf -s ../../../asn1/mpeg-audio/packet-mpeg-audio-template -D ../../../asn1/mpeg-audio mpeg-audio.asn */
/* Input file: packet-mpeg-audio-template.c */
@@ -487,22 +487,22 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
static const char *version_names[] = { "1", "2", "2.5" };
col_add_fstr(pinfo->cinfo, COL_PROTOCOL,
- "MPEG-%s", version_names[MPA_VERSION(&mpa)]);
+ "MPEG-%s", version_names[mpa_version(&mpa)]);
}
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO,
- "Audio Layer %d", MPA_LAYER(&mpa) + 1);
+ "Audio Layer %d", mpa_layer(&mpa) + 1);
if (MPA_BITRATE_VALID(&mpa) && MPA_FREQUENCY_VALID(&mpa)) {
data_size = MPA_DATA_BYTES(&mpa) - sizeof mpa;
if (check_col(pinfo->cinfo, COL_DEF_SRC)) {
SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_SRC,
- "%d kb/s", MPA_BITRATE(&mpa) / 1000);
+ "%d kb/s", mpa_bitrate(&mpa) / 1000);
}
if (check_col(pinfo->cinfo, COL_DEF_DST)) {
SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_DST,
- "%g kHz", MPA_FREQUENCY(&mpa) / (float)1000);
+ "%g kHz", mpa_frequency(&mpa) / (float)1000);
}
}
@@ -518,7 +518,7 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tree, hf_mpeg_audio_data, tvb,
offset / 8, data_size, FALSE);
offset += data_size * 8;
- padding = MPA_PADDING(&mpa);
+ padding = mpa_padding(&mpa);
if (padding > 0) {
proto_tree_add_item(tree, hf_mpeg_audio_padbytes, tvb,
offset / 8, padding, FALSE);