ttml: fix log init
authorStéphane Cerveau <scerveau@collabora.com>
Mon, 11 Oct 2021 13:23:08 +0000 (15:23 +0200)
committerStéphane Cerveau <scerveau@collabora.com>
Mon, 11 Oct 2021 13:23:08 +0000 (15:23 +0200)
The log system should be init before calling a log

Fix regression after:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1112>

subprojects/gst-plugins-bad/ext/ttml/gstttmlparse.c
subprojects/gst-plugins-bad/ext/ttml/gstttmlrender.c

index 7966fba..eafa719 100644 (file)
@@ -608,13 +608,13 @@ gst_element_ttmlparse_init (GstPlugin * plugin)
 
   ttml_element_init (plugin);
 
+  GST_DEBUG_CATEGORY_INIT (ttmlparse_debug, "ttmlparse", 0, "TTML parser");
+
   /* We don't want this autoplugged by default yet for now */
   if (g_getenv ("GST_TTML_AUTOPLUG")) {
     GST_INFO_OBJECT (plugin, "Registering ttml elements with primary rank.");
     rank = GST_RANK_PRIMARY;
   }
 
-  GST_DEBUG_CATEGORY_INIT (ttmlparse_debug, "ttmlparse", 0, "TTML parser");
-
   return gst_element_register (plugin, "ttmlparse", rank, GST_TYPE_TTML_PARSE);
 }
index 8589d6b..82db24c 100644 (file)
@@ -3071,14 +3071,14 @@ gst_element_ttmlrender_init (GstPlugin * plugin)
 
   ttml_element_init (plugin);
 
+  GST_DEBUG_CATEGORY_INIT (ttmlrender_debug, "ttmlrender", 0, "TTML renderer");
+
   /* We don't want this autoplugged by default yet for now */
   if (g_getenv ("GST_TTML_AUTOPLUG")) {
     GST_INFO_OBJECT (plugin, "Registering ttml elements with primary rank.");
     rank = GST_RANK_PRIMARY;
   }
 
-  GST_DEBUG_CATEGORY_INIT (ttmlrender_debug, "ttmlrender", 0, "TTML renderer");
-
   return gst_element_register (plugin, "ttmlrender", rank,
       GST_TYPE_TTML_RENDER);
 }