summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-mpeg-pmt.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/epan/dissectors/packet-mpeg-pmt.c b/epan/dissectors/packet-mpeg-pmt.c
index 67af65cbf3..d558bd8008 100644
--- a/epan/dissectors/packet-mpeg-pmt.c
+++ b/epan/dissectors/packet-mpeg-pmt.c
@@ -122,7 +122,7 @@ dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
{
guint offset = 0, length = 0;
- guint descriptor_end, prog_info_len, es_info_len;
+ guint prog_info_len, es_info_len;
guint16 pid;
proto_item *ti;
@@ -163,9 +163,7 @@ dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_program_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- descriptor_end = offset + prog_info_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_tree);
+ offset += proto_mpeg_descriptor_loop_dissect(tvb, offset, prog_info_len, mpeg_pmt_tree);
while (offset < length) {
@@ -186,10 +184,7 @@ dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_es_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- descriptor_end = offset + es_info_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_stream_tree);
-
+ offset += proto_mpeg_descriptor_loop_dissect(tvb, offset, es_info_len, mpeg_pmt_tree);
}
offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_pmt_tree, 0, offset);