diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-26 23:06:07 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-26 23:06:07 +0000 |
commit | 455cc7f1236fa8cb290447aa57c4ac7cd05efb41 (patch) | |
tree | 03479cae6d944acccc60f7283099cb88a27c4712 /epan/dissectors | |
parent | 117b4956ddeaea97375cda47bdab690ea97a3dc9 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23612 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-mpeg-audio.c | 12 |
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); |