mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
opencv: motioncells: remove unnecessary check
We know that the gchar arrays contain at least one string. Furthermore, g_strfreev() checks if the array is NULL and simply returns if it is. Hence, there is no need to check if the array is empty before using g_strfreev(). CID 1327412-1327415
This commit is contained in:
parent
f7c4bb5ac6
commit
1193fc875d
1 changed files with 4 additions and 8 deletions
|
@ -517,8 +517,7 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
|
|||
filter->motionmaskcoord_count = 0;
|
||||
}
|
||||
}
|
||||
if (strs)
|
||||
g_strfreev (strs);
|
||||
g_strfreev (strs);
|
||||
tmpux = -1;
|
||||
tmpuy = -1;
|
||||
tmplx = -1;
|
||||
|
@ -545,8 +544,7 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
|
|||
filter->motionmaskcells_count = 0;
|
||||
}
|
||||
}
|
||||
if (motionmaskcellsstr)
|
||||
g_strfreev (motionmaskcellsstr);
|
||||
g_strfreev (motionmaskcellsstr);
|
||||
tmpux = -1;
|
||||
tmpuy = -1;
|
||||
tmplx = -1;
|
||||
|
@ -568,8 +566,7 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
|
|||
filter->motioncellscolor->G_channel_value = g;
|
||||
filter->motioncellscolor->B_channel_value = b;
|
||||
}
|
||||
if (colorstr)
|
||||
g_strfreev (colorstr);
|
||||
g_strfreev (colorstr);
|
||||
break;
|
||||
case PROP_MOTIONCELLSIDX:
|
||||
motioncellsstr = g_strsplit (g_value_get_string (value), ",", 255);
|
||||
|
@ -595,8 +592,7 @@ gst_motion_cells_set_property (GObject * object, guint prop_id,
|
|||
filter->motioncells_count = 0;
|
||||
}
|
||||
}
|
||||
if (motioncellsstr)
|
||||
g_strfreev (motioncellsstr);
|
||||
g_strfreev (motioncellsstr);
|
||||
tmpux = -1;
|
||||
tmpuy = -1;
|
||||
tmplx = -1;
|
||||
|
|
Loading…
Reference in a new issue