diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-01-03 20:42:43 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-01-03 20:42:43 +0000 |
commit | 4f2ea9f7e95cb2eba7aff0c6580237b46f4b6596 (patch) | |
tree | c4e777326ee0593534ffa9e37b59036c2cbbc15c /packet-h261.c | |
parent | d0606b986ab168816861c487389178cad5d8dbb1 (diff) | |
download | wireshark-4f2ea9f7e95cb2eba7aff0c6580237b46f4b6596.tar.gz wireshark-4f2ea9f7e95cb2eba7aff0c6580237b46f4b6596.tar.bz2 wireshark-4f2ea9f7e95cb2eba7aff0c6580237b46f4b6596.zip |
Small bugfix for h.261, the HMVD field spans two bytes, read those two bytes
when building the integer value and not just the same byte twice.
Also make the hex pane display both bytes this field spans.
svn path=/trunk/; revision=6846
Diffstat (limited to 'packet-h261.c')
-rw-r--r-- | packet-h261.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packet-h261.c b/packet-h261.c index 167fdc63bd..3b8840b23e 100644 --- a/packet-h261.c +++ b/packet-h261.c @@ -2,7 +2,7 @@ * * Routines for ITU-T Recommendation H.261 dissection * - * $Id: packet-h261.c,v 1.17 2002/08/28 21:00:15 jmayer Exp $ + * $Id: packet-h261.c,v 1.18 2003/01/03 20:42:43 sahlberg Exp $ * * Copyright 2000, Philips Electronics N.V. * Andreas Sikkema <andreas.sikkema@philips.com> @@ -98,10 +98,11 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) /* QUANT 3rd octet, 5 bits (starting at bit 2!) */ proto_tree_add_uint( h261_tree, hf_h261_quant, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 124 ); + /* HMVD 3rd octet 2 bits, 4th octet 3 bits */ - proto_tree_add_uint( h261_tree, hf_h261_hmvd, tvb, offset, 1, - ( ( tvb_get_guint8( tvb, offset ) << 4) >> 4 ) - + ( tvb_get_guint8( tvb, offset ) >> 5 ) ); + proto_tree_add_uint( h261_tree, hf_h261_hmvd, tvb, offset, 2, + ( ( tvb_get_guint8( tvb, offset ) & 0x03 ) << 3 ) + + ( tvb_get_guint8( tvb, offset+1 ) >> 5 ) ); offset++; /* VMVD 4th octet, last 5 bits */ |