mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 02:13:46 +00:00
scaletempo: Free the various buffers in GstBaseTransform::stop()
Previously we leaked them completely, but as they're specific to the caps freeing them in stop() instead of finalize() makes most sense.
This commit is contained in:
parent
75f21c8698
commit
903c431d6d
1 changed files with 20 additions and 0 deletions
|
@ -698,6 +698,25 @@ gst_scaletempo_start (GstBaseTransform * trans)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_scaletempo_stop (GstBaseTransform * trans)
|
||||||
|
{
|
||||||
|
GstScaletempo *scaletempo = GST_SCALETEMPO (trans);
|
||||||
|
|
||||||
|
g_free (scaletempo->buf_queue);
|
||||||
|
scaletempo->buf_queue = NULL;
|
||||||
|
g_free (scaletempo->buf_overlap);
|
||||||
|
scaletempo->buf_overlap = NULL;
|
||||||
|
g_free (scaletempo->table_blend);
|
||||||
|
scaletempo->table_blend = NULL;
|
||||||
|
g_free (scaletempo->buf_pre_corr);
|
||||||
|
scaletempo->buf_pre_corr = NULL;
|
||||||
|
g_free (scaletempo->table_window);
|
||||||
|
scaletempo->table_window = NULL;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_scaletempo_query (GstBaseTransform * trans, GstPadDirection direction,
|
gst_scaletempo_query (GstBaseTransform * trans, GstPadDirection direction,
|
||||||
GstQuery * query)
|
GstQuery * query)
|
||||||
|
@ -857,6 +876,7 @@ gst_scaletempo_class_init (GstScaletempoClass * klass)
|
||||||
basetransform_class->transform = GST_DEBUG_FUNCPTR (gst_scaletempo_transform);
|
basetransform_class->transform = GST_DEBUG_FUNCPTR (gst_scaletempo_transform);
|
||||||
basetransform_class->query = GST_DEBUG_FUNCPTR (gst_scaletempo_query);
|
basetransform_class->query = GST_DEBUG_FUNCPTR (gst_scaletempo_query);
|
||||||
basetransform_class->start = GST_DEBUG_FUNCPTR (gst_scaletempo_start);
|
basetransform_class->start = GST_DEBUG_FUNCPTR (gst_scaletempo_start);
|
||||||
|
basetransform_class->stop = GST_DEBUG_FUNCPTR (gst_scaletempo_stop);
|
||||||
basetransform_class->submit_input_buffer =
|
basetransform_class->submit_input_buffer =
|
||||||
GST_DEBUG_FUNCPTR (gst_scaletempo_submit_input_buffer);
|
GST_DEBUG_FUNCPTR (gst_scaletempo_submit_input_buffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue