From 3793619a0230e60ccc9f0f20e23fc8cc8929d88d Mon Sep 17 00:00:00 2001 From: Daniel Morin Date: Mon, 4 Dec 2023 19:11:23 -0500 Subject: [PATCH] onnx: fix tensor id loading - Fix quark genaration. String loaded from the model/file are not static. Part-of: --- subprojects/gst-plugins-bad/ext/onnx/gstonnxclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/onnx/gstonnxclient.cpp b/subprojects/gst-plugins-bad/ext/onnx/gstonnxclient.cpp index 308c65eff8..95071d0eea 100644 --- a/subprojects/gst-plugins-bad/ext/onnx/gstonnxclient.cpp +++ b/subprojects/gst-plugins-bad/ext/onnx/gstonnxclient.cpp @@ -235,7 +235,7 @@ GstOnnxClient::GstOnnxClient ():session (nullptr), Ort::AllocatedStringPtr res = metaData.LookupCustomMetadataMapAllocated (name, ortAllocator); if (res) { - GQuark quark = g_quark_from_static_string (res.get ()); + GQuark quark = g_quark_from_string (res.get ()); outputIds.push_back (quark); } else { GST_ERROR ("Failed to look up id for key %s", name); @@ -449,7 +449,7 @@ GstOnnxClient::GstOnnxClient ():session (nullptr), } template < typename T> - void GstOnnxClient::convert_image_remove_alpha (T *dst, + void GstOnnxClient::convert_image_remove_alpha (T *dst, GstMlInputImageFormat hwc, uint8_t **srcPtr, uint32_t srcSamplesPerPixel, uint32_t stride) { size_t destIndex = 0;