ges: Fix critical warning

GStreamer-CRITICAL **: 20:44:38.256: gst_debug_log_full_valist:
assertion 'category != NULL' failed

Make sure debug category initialized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6304>
This commit is contained in:
Seungha Yang 2024-03-08 20:56:46 +09:00
parent 7d5bb1ea7a
commit 2e1eaaec5e

View file

@ -129,9 +129,24 @@
#include <gst/gst.h>
GST_DEBUG_CATEGORY_STATIC (ges_asset_debug);
#undef GST_CAT_DEFAULT
#define GST_CAT_DEFAULT ges_asset_debug
#ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT ensure_debug_category()
static GstDebugCategory *
ensure_debug_category (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
gsize cat_done = (gsize) _gst_debug_category_new ("ges-asset",
GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GES Asset");
g_once_init_leave (&cat_gonce, cat_done);
}
return (GstDebugCategory *) cat_gonce;
}
#endif /* GST_DISABLE_GST_DEBUG */
enum
{
@ -538,9 +553,6 @@ ges_asset_class_init (GESAssetClass * klass)
klass->extract = ges_asset_extract_default;
klass->request_id_update = ges_asset_request_id_update_default;
klass->inform_proxy = NULL;
GST_DEBUG_CATEGORY_INIT (ges_asset_debug, "ges-asset",
GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GES Asset");
}
void