From 555652a37f17cccc4caa779470fcabeb286a750d Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 23 Aug 2003 06:36:46 +0000 Subject: 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 --- packet-mpeg1.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'packet-mpeg1.c') 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, @@ -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 #include +#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); } -- cgit v1.2.3