mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
cudaloader: Initialize logging category
gstcudaloader.cpp defines GST_DEBUG_CATEGORY (gst_cudaloader_debug); but it wasn't initializing it anywhere. This caused the following error to be logged by gst-plugin-scanner when libcuda.so.1/nvcuda.dll couldn't be loaded, e.g. in systems without CUDA: (gst-plugin-scanner:39618): GStreamer-CRITICAL **: 14:40:22.346: gst_debug_log_full_valist: assertion 'category != NULL' failed This patch fixes the bug by initializing the category in gst_cuda_load_library_once_func() before any logging occurs. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4154>
This commit is contained in:
parent
136b2e0eae
commit
85b6625150
1 changed files with 3 additions and 0 deletions
|
@ -146,6 +146,9 @@ gst_cuda_load_library_once_func (void)
|
||||||
const gchar *filename = CUDA_LIBNAME;
|
const gchar *filename = CUDA_LIBNAME;
|
||||||
GstNvCodecCudaVTable *vtable;
|
GstNvCodecCudaVTable *vtable;
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_cudaloader_debug, "cudaloader", 0,
|
||||||
|
"CUDA plugin loader");
|
||||||
|
|
||||||
module = g_module_open (filename, G_MODULE_BIND_LAZY);
|
module = g_module_open (filename, G_MODULE_BIND_LAZY);
|
||||||
if (module == nullptr) {
|
if (module == nullptr) {
|
||||||
GST_WARNING ("Could not open library %s, %s", filename, g_module_error ());
|
GST_WARNING ("Could not open library %s, %s", filename, g_module_error ());
|
||||||
|
|
Loading…
Reference in a new issue