mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
analytics: Add validation on classification analytics-meta
- Add valiation on parameters passed to gst_analytics_cls_add_cls_mtd. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7046>
This commit is contained in:
parent
9da1268656
commit
55b12a80d6
1 changed files with 3 additions and 0 deletions
|
@ -197,6 +197,9 @@ gst_analytics_relation_meta_add_cls_mtd (GstAnalyticsRelationMeta *
|
|||
GstAnalyticsClsMtd * cls_mtd)
|
||||
{
|
||||
g_return_val_if_fail (instance, FALSE);
|
||||
g_return_val_if_fail (confidence_levels != NULL, FALSE);
|
||||
g_return_val_if_fail (class_quarks != NULL, FALSE);
|
||||
|
||||
gsize confidence_levels_size =
|
||||
(sizeof (GstAnalyticsClsConfLvlAndClass) * length);
|
||||
gsize size = sizeof (GstAnalyticsClsMtdData) + confidence_levels_size;
|
||||
|
|
Loading…
Reference in a new issue