aboutsummaryrefslogtreecommitdiffstats
path: root/packet-mpeg1.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-08-23 06:36:46 +0000
committerGuy Harris <guy@alum.mit.edu>2003-08-23 06:36:46 +0000
commit555652a37f17cccc4caa779470fcabeb286a750d (patch)
tree18703fada771039d686ae62ff720bf65a67952a8 /packet-mpeg1.c
parent22b60d9812bc2151a3969753c3aa3b44f830d10a (diff)
Add a dissector table for RTP payload types, and have dissectors
register themselves in that table rather than exporting their dissectors by name and having the RTP dissector know about particular dissectors for particular payload types. svn path=/trunk/; revision=8215
Diffstat (limited to 'packet-mpeg1.c')
-rw-r--r--packet-mpeg1.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/packet-mpeg1.c b/packet-mpeg1.c
index 0c2d8800f0..a6dd2a088f 100644
--- a/packet-mpeg1.c
+++ b/packet-mpeg1.c
@@ -2,7 +2,7 @@
*
* Routines for RFC 2250 MPEG-1 dissection
*
- * $Id: packet-mpeg1.c,v 1.9 2002/08/28 21:00:22 jmayer Exp $
+ * $Id: packet-mpeg1.c,v 1.10 2003/08/23 06:36:46 guy Exp $
*
* Copyright 2001,
* Francisco Javier Cabello Torres, <fjcabello@vtools.es>
@@ -28,8 +28,6 @@
/*
* This dissector tries to dissect the MPEG-1 video streams.
- *
- * This dissector is called by the RTP dissector
*/
@@ -43,6 +41,8 @@
#include <stdio.h>
#include <string.h>
+#include "rtp_pt.h"
+
#define RTP_MPG_MBZ(word) ( word >> 11)
#define RTP_MPG_T(word) ( (word >> 10) & 1 )
#define RTP_MPG_TR(word) ( word & 0x3ff )
@@ -382,6 +382,13 @@ proto_register_mpeg1(void)
proto_mpg = proto_register_protocol("RFC 2250 MPEG1","MPEG1","mpeg1");
proto_register_field_array(proto_mpg, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mpeg1(void)
+{
+ dissector_handle_t mpeg1_handle;
- register_dissector("mpeg1", dissect_mpeg1, proto_mpg);
+ mpeg1_handle = create_dissector_handle(dissect_mpeg1, proto_mpg);
+ dissector_add("rtp.pt", PT_MPV, mpeg1_handle);
}