aboutsummaryrefslogtreecommitdiffstats
path: root/packet-h261.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-01-03 20:42:43 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-01-03 20:42:43 +0000
commit4f2ea9f7e95cb2eba7aff0c6580237b46f4b6596 (patch)
treec4e777326ee0593534ffa9e37b59036c2cbbc15c /packet-h261.c
parentd0606b986ab168816861c487389178cad5d8dbb1 (diff)
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.c9
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 */