diff options
author | Anders Broman <anders.broman@ericsson.com> | 2006-05-27 18:25:08 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2006-05-27 18:25:08 +0000 |
commit | 949a2d9bf78b944e8d15bb106bb9f29f0c8982c0 (patch) | |
tree | e98aa052f0fef77748248e7a31dbc27d4c74e7dc /epan/dissectors/packet-amr.c | |
parent | f377855e9fba9bf2a6d25d1ff6ce3b8d776db04a (diff) |
Handle the case with only one speech sample.
svn path=/trunk/; revision=18226
Diffstat (limited to 'epan/dissectors/packet-amr.c')
-rw-r--r-- | epan/dissectors/packet-amr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-amr.c b/epan/dissectors/packet-amr.c index 352d6b00df..13603cb5ec 100644 --- a/epan/dissectors/packet-amr.c +++ b/epan/dissectors/packet-amr.c @@ -191,6 +191,7 @@ dissect_amr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) int toc_offset = 0; guint8 octet; proto_item *item; + gboolean first_time; /* Set up structures needed to add the protocol subtree and manage it */ proto_item *ti,*toc_item; @@ -268,8 +269,10 @@ dissect_amr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) octet = tvb_get_guint8(tvb,offset); toc_item = proto_tree_add_text(amr_tree, tvb, offset, -1, "Payload Table of Contents"); toc_tree = proto_item_add_subtree(toc_item, ett_amr_toc); - - while ( ( octet& 0x80 ) == 0x80 ){ + + first_time = TRUE; + while ((( octet& 0x80 ) == 0x80)||(first_time == TRUE)){ + first_time = FALSE; octet = tvb_get_guint8(tvb,offset); proto_tree_add_item(amr_tree, hf_amr_toc_f, tvb, offset, 1, FALSE); proto_tree_add_item(amr_tree, hf_amr_toc_ft, tvb, offset, 1, FALSE); |