diff options
author | Evan Huus <eapache@gmail.com> | 2013-09-05 13:15:04 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-09-05 13:15:04 +0000 |
commit | 8552f0df6431b752511b845ce1f9aaa37a70586b (patch) | |
tree | 46c8368b872041804a2aaf12fbbb16daa9afe519 | |
parent | e67292ff14762d8447456f89db6067e1991652ea (diff) |
The length field is retrieved from the packet in bytes, not bits, so stop
adjusting it by 8 everywhere.
Seems to fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9087 though
someone more familiar with the protocol will have to verify it's actually
correct now.
svn path=/trunk/; revision=51784
-rw-r--r-- | asn1/mpeg-pes/packet-mpeg-pes-template.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-mpeg-pes.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/asn1/mpeg-pes/packet-mpeg-pes-template.c b/asn1/mpeg-pes/packet-mpeg-pes-template.c index 44d019e3fb..07827197c1 100644 --- a/asn1/mpeg-pes/packet-mpeg-pes-template.c +++ b/asn1/mpeg-pes/packet-mpeg-pes-template.c @@ -491,7 +491,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data * XXX Some one with access to the spec should check this */ if(length !=0 && stream != STREAM_VIDEO){ - length -= 5 * 8; + length -= 5; } header_length = tvb_get_guint8(tvb, 8); @@ -503,7 +503,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data offset += header_length * 8; /* length may be zero for Video stream */ if(length !=0 && stream != STREAM_VIDEO){ - length -= header_length * 8; + length -= header_length; } } @@ -513,7 +513,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data return TRUE; } - es = tvb_new_subset(tvb, offset / 8, -1, length / 8); + es = tvb_new_subset(tvb, offset / 8, -1, length); if (tvb_get_ntoh24(es, 0) == PES_PREFIX) dissect_mpeg_pes(es, pinfo, tree, NULL); else if (tvb_get_guint8(es, 0) == 0xff) diff --git a/epan/dissectors/packet-mpeg-pes.c b/epan/dissectors/packet-mpeg-pes.c index 445eb66ef8..a231f71b5a 100644 --- a/epan/dissectors/packet-mpeg-pes.c +++ b/epan/dissectors/packet-mpeg-pes.c @@ -932,7 +932,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data * XXX Some one with access to the spec should check this */ if(length !=0 && stream != STREAM_VIDEO){ - length -= 5 * 8; + length -= 5; } header_length = tvb_get_guint8(tvb, 8); @@ -944,7 +944,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data offset += header_length * 8; /* length may be zero for Video stream */ if(length !=0 && stream != STREAM_VIDEO){ - length -= header_length * 8; + length -= header_length; } } @@ -954,7 +954,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data return TRUE; } - es = tvb_new_subset(tvb, offset / 8, -1, length / 8); + es = tvb_new_subset(tvb, offset / 8, -1, length); if (tvb_get_ntoh24(es, 0) == PES_PREFIX) dissect_mpeg_pes(es, pinfo, tree, NULL); else if (tvb_get_guint8(es, 0) == 0xff) |