Skip to content

Commit 7d64646

Browse files
committed
Merge branch 'hotfix/fix-prediction-size'
2 parents 4a11323 + d851d30 commit 7d64646

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
55
dnl initialize autoconf
66
dnl releases only do -Wall, git and prerelease does -Werror too
77
dnl use a three digit version number for releases, and four for git/pre
8-
AC_INIT([GStreamer Inference],[0.6.0.1],[https://github.com/RidgeRun/gst-inference/issues],[gst-inference])
8+
AC_INIT([GStreamer Inference],[0.6.1.1],[https://github.com/RidgeRun/gst-inference/issues],[gst-inference])
99

1010
AG_GST_INIT
1111

gst-libs/gst/r2inference/gstbackend.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ gst_backend_process_frame (GstBackend *self, GstVideoFrame *input_frame,
432432
*prediction_size = prediction->GetResultSize ();
433433

434434
/*could we avoid memory copy ?*/
435-
*prediction_data = g_malloc(*prediction_size);
436-
memcpy(*prediction_data, prediction->GetResultData(), *prediction_size);
435+
*prediction_data = g_malloc(*prediction_size * sizeof(gfloat));
436+
memcpy(*prediction_data, prediction->GetResultData(), *prediction_size * sizeof(gfloat));
437437

438438
GST_LOG_OBJECT (self, "Size of prediction %p is %lu",
439439
*prediction_data, *prediction_size);

gst-libs/gst/r2inference/gstinferencepostprocess.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ gst_fill_classification_meta (GstClassificationMeta * class_meta,
4848
g_return_val_if_fail (class_meta != NULL, FALSE);
4949
g_return_val_if_fail (prediction != NULL, FALSE);
5050

51-
class_meta->num_labels = predsize / sizeof (gfloat);
51+
class_meta->num_labels = predsize;
5252
class_meta->label_probs =
5353
g_malloc (class_meta->num_labels * sizeof (gdouble));
5454
for (gint i = 0; i < class_meta->num_labels; ++i) {

0 commit comments

Comments
 (0)