summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-h263p.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-09-22 16:26:41 +0000
committerBill Meier <wmeier@newsguy.com>2008-09-22 16:26:41 +0000
commit6aa5f8aa6af33baa7b2f37e14cbfc3e73136b333 (patch)
tree809bb5319c74d76eab725742a75769e9e890a76a /epan/dissectors/packet-h263p.c
parentc08a1f420e484941db43234a2236c57df6a9ef45 (diff)
downloadwireshark-6aa5f8aa6af33baa7b2f37e14cbfc3e73136b333.tar.gz
Minor cleanup related to proto_reg_handoff
svn path=/trunk/; revision=26246
Diffstat (limited to 'epan/dissectors/packet-h263p.c')
-rw-r--r--epan/dissectors/packet-h263p.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/epan/dissectors/packet-h263p.c b/epan/dissectors/packet-h263p.c
index ae983984a1..d37604ce91 100644
--- a/epan/dissectors/packet-h263p.c
+++ b/epan/dissectors/packet-h263p.c
@@ -68,7 +68,6 @@ static gint ett_h263P_data = -1;
/* The dynamic payload type which will be dissected as H.263-1998/H263-2000 */
-static guint dynamic_payload_type = 0;
static guint temp_dynamic_payload_type = 0;
/* RFC 4629 */
@@ -211,12 +210,14 @@ dissect_h263P( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
void
proto_reg_handoff_h263P(void)
{
- dissector_handle_t h263P_handle;
- static int h263P_prefs_initialized = FALSE;
-
- h263P_handle = create_dissector_handle(dissect_h263P, proto_h263P);
+ static dissector_handle_t h263P_handle;
+ static guint dynamic_payload_type;
+ static gboolean h263P_prefs_initialized = FALSE;
if (!h263P_prefs_initialized) {
+ h263P_handle = find_dissector("h263P");
+ dissector_add_string("rtp_dyn_payload_type","H263-1998", h263P_handle);
+ dissector_add_string("rtp_dyn_payload_type","H263-2000", h263P_handle);
h263P_prefs_initialized = TRUE;
}
else {
@@ -228,9 +229,6 @@ proto_reg_handoff_h263P(void)
if ( dynamic_payload_type > 95 ){
dissector_add("rtp.pt", dynamic_payload_type, h263P_handle);
}
-
- dissector_add_string("rtp_dyn_payload_type","H263-1998", h263P_handle);
- dissector_add_string("rtp_dyn_payload_type","H263-2000", h263P_handle);
}
@@ -408,10 +406,11 @@ proto_register_h263P(void)
h263P_module = prefs_register_protocol(proto_h263P, proto_reg_handoff_h263P);
prefs_register_uint_preference(h263P_module, "dynamic.payload.type",
- "H263-1998 and H263-2000 dynamic payload type",
- "The dynamic payload type which will be interpreted as H264",
- 10,
- &temp_dynamic_payload_type);
+ "H263-1998 and H263-2000 dynamic payload type",
+ "The dynamic payload type which will be interpreted as H264"
+ "; The value must be greater than 95",
+ 10,
+ &temp_dynamic_payload_type);
register_dissector("h263P", dissect_h263P, proto_h263P);