onnx: fix tensor id loading

- Fix quark genaration. String loaded from the model/file are not static.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
This commit is contained in:
Daniel Morin 2023-12-04 19:11:23 -05:00 committed by GStreamer Marge Bot
parent 48e3836482
commit 3793619a02

View file

@ -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;