From 1438bf26ac6f2cc5c1cd3c6d6cba7ddc9ccda390 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 3 Aug 2011 22:50:05 +1000 Subject: [PATCH] matroska: Register new debug category Register the matroskareadcommon debug category when the plugin is loaded to avoid assertion output when debug is turned on. --- gst/matroska/matroska-read-common.c | 2 +- gst/matroska/matroska-read-common.h | 2 ++ gst/matroska/matroska.c | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/matroska/matroska-read-common.c b/gst/matroska/matroska-read-common.c index 4431a51..32b513e 100644 --- a/gst/matroska/matroska-read-common.c +++ b/gst/matroska/matroska-read-common.c @@ -45,7 +45,7 @@ #include "ebml-read.h" #include "matroska-read-common.h" -GST_DEBUG_CATEGORY_STATIC (matroskareadcommon_debug); +GST_DEBUG_CATEGORY (matroskareadcommon_debug); #define GST_CAT_DEFAULT matroskareadcommon_debug #define DEBUG_ELEMENT_START(common, ebml, element) \ diff --git a/gst/matroska/matroska-read-common.h b/gst/matroska/matroska-read-common.h index 68b0f6c..cf617e6 100644 --- a/gst/matroska/matroska-read-common.h +++ b/gst/matroska/matroska-read-common.h @@ -31,6 +31,8 @@ G_BEGIN_DECLS +GST_DEBUG_CATEGORY_EXTERN(matroskareadcommon_debug); + typedef enum { GST_MATROSKA_READ_STATE_START, GST_MATROSKA_READ_STATE_SEGMENT, diff --git a/gst/matroska/matroska.c b/gst/matroska/matroska.c index 57db7a3..5391400 100644 --- a/gst/matroska/matroska.c +++ b/gst/matroska/matroska.c @@ -25,6 +25,7 @@ #include "matroska-demux.h" #include "matroska-parse.h" +#include "matroska-read-common.h" #include "matroska-mux.h" #include "matroska-ids.h" #include "webm-mux.h" @@ -40,6 +41,9 @@ plugin_init (GstPlugin * plugin) gst_matroska_register_tags (); + GST_DEBUG_CATEGORY_INIT (matroskareadcommon_debug, "matroskareadcommon", 0, + "Matroska demuxer/parser shared debug"); + ret = gst_matroska_demux_plugin_init (plugin); ret &= gst_matroska_parse_plugin_init (plugin); ret &= gst_element_register (plugin, "matroskamux", GST_RANK_PRIMARY, -- 2.7.4