mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
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:
parent
48e3836482
commit
3793619a02
1 changed files with 2 additions and 2 deletions
|
@ -235,7 +235,7 @@ GstOnnxClient::GstOnnxClient ():session (nullptr),
|
||||||
Ort::AllocatedStringPtr res =
|
Ort::AllocatedStringPtr res =
|
||||||
metaData.LookupCustomMetadataMapAllocated (name, ortAllocator);
|
metaData.LookupCustomMetadataMapAllocated (name, ortAllocator);
|
||||||
if (res) {
|
if (res) {
|
||||||
GQuark quark = g_quark_from_static_string (res.get ());
|
GQuark quark = g_quark_from_string (res.get ());
|
||||||
outputIds.push_back (quark);
|
outputIds.push_back (quark);
|
||||||
} else {
|
} else {
|
||||||
GST_ERROR ("Failed to look up id for key %s", name);
|
GST_ERROR ("Failed to look up id for key %s", name);
|
||||||
|
@ -449,7 +449,7 @@ GstOnnxClient::GstOnnxClient ():session (nullptr),
|
||||||
}
|
}
|
||||||
|
|
||||||
template < typename T>
|
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,
|
GstMlInputImageFormat hwc, uint8_t **srcPtr, uint32_t srcSamplesPerPixel,
|
||||||
uint32_t stride) {
|
uint32_t stride) {
|
||||||
size_t destIndex = 0;
|
size_t destIndex = 0;
|
||||||
|
|
Loading…
Reference in a new issue