analytics: fix analytics-meta re-use

- Fix alignment error when source and destination analytics-meta have the same
  relation order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5767>
This commit is contained in:
Daniel Morin 2023-12-05 20:12:36 -05:00 committed by GStreamer Marge Bot
parent 012222bcb3
commit 4425562661

View file

@ -320,8 +320,8 @@ gst_analytics_relation_meta_transform (GstBuffer * transbuf,
}
if (rmeta->rel_order == new->rel_order) {
memcpy (new->adj_mat + new->rel_order, rmeta->adj_mat,
rmeta->rel_order * rmeta->rel_order);
memcpy (new->adj_mat + new->rel_order, rmeta->adj_mat +
rmeta->rel_order, rmeta->rel_order * rmeta->rel_order);
} else {
/* When destination adj_mat has a higher order than source we need
* to copy by row to have the correct alignment */