mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
effectv/ripple: remove unnecessary NULL checks before g_free()
This commit is contained in:
parent
1c30fa8350
commit
24e689c57e
1 changed files with 8 additions and 16 deletions
|
@ -460,7 +460,6 @@ gst_rippletv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
|
||||||
|
|
||||||
/* we over allocate the buffers, as the render code does not handle clipping
|
/* we over allocate the buffers, as the render code does not handle clipping
|
||||||
* very well */
|
* very well */
|
||||||
if (filter->map)
|
|
||||||
g_free (filter->map);
|
g_free (filter->map);
|
||||||
filter->map = g_new0 (gint, (1 + filter->map_h) * filter->map_w * 3);
|
filter->map = g_new0 (gint, (1 + filter->map_h) * filter->map_w * 3);
|
||||||
|
|
||||||
|
@ -468,15 +467,12 @@ gst_rippletv_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
|
||||||
filter->map2 = filter->map + filter->map_w * filter->map_h;
|
filter->map2 = filter->map + filter->map_w * filter->map_h;
|
||||||
filter->map3 = filter->map + filter->map_w * filter->map_h * 2;
|
filter->map3 = filter->map + filter->map_w * filter->map_h * 2;
|
||||||
|
|
||||||
if (filter->vtable)
|
|
||||||
g_free (filter->vtable);
|
g_free (filter->vtable);
|
||||||
filter->vtable = g_new0 (gint8, (1 + filter->map_h) * filter->map_w * 2);
|
filter->vtable = g_new0 (gint8, (1 + filter->map_h) * filter->map_w * 2);
|
||||||
|
|
||||||
if (filter->background)
|
|
||||||
g_free (filter->background);
|
g_free (filter->background);
|
||||||
filter->background = g_new0 (gint16, width * (height + 1));
|
filter->background = g_new0 (gint16, width * (height + 1));
|
||||||
|
|
||||||
if (filter->diff)
|
|
||||||
g_free (filter->diff);
|
g_free (filter->diff);
|
||||||
filter->diff = g_new0 (guint8, width * (height + 1));
|
filter->diff = g_new0 (guint8, width * (height + 1));
|
||||||
GST_OBJECT_UNLOCK (filter);
|
GST_OBJECT_UNLOCK (filter);
|
||||||
|
@ -507,19 +503,15 @@ gst_rippletv_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
GstRippleTV *filter = GST_RIPPLETV (object);
|
GstRippleTV *filter = GST_RIPPLETV (object);
|
||||||
|
|
||||||
if (filter->map)
|
|
||||||
g_free (filter->map);
|
g_free (filter->map);
|
||||||
filter->map = NULL;
|
filter->map = NULL;
|
||||||
|
|
||||||
if (filter->vtable)
|
|
||||||
g_free (filter->vtable);
|
g_free (filter->vtable);
|
||||||
filter->vtable = NULL;
|
filter->vtable = NULL;
|
||||||
|
|
||||||
if (filter->background)
|
|
||||||
g_free (filter->background);
|
g_free (filter->background);
|
||||||
filter->background = NULL;
|
filter->background = NULL;
|
||||||
|
|
||||||
if (filter->diff)
|
|
||||||
g_free (filter->diff);
|
g_free (filter->diff);
|
||||||
filter->diff = NULL;
|
filter->diff = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue