mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 15:02:40 +00:00
audioaggregator: fix buffer leak
If the pad was still owning a buffer when being destroyed it was leaked. Fix a leak with the test_flush_start_flush_stop test. https://bugzilla.gnome.org/show_bug.cgi?id=766663
This commit is contained in:
parent
e925a8acf0
commit
172529e151
1 changed files with 12 additions and 0 deletions
|
@ -78,13 +78,25 @@ static gboolean
|
||||||
gst_audio_aggregator_pad_flush_pad (GstAggregatorPad * aggpad,
|
gst_audio_aggregator_pad_flush_pad (GstAggregatorPad * aggpad,
|
||||||
GstAggregator * aggregator);
|
GstAggregator * aggregator);
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_audio_aggregator_pad_finalize (GObject * object)
|
||||||
|
{
|
||||||
|
GstAudioAggregatorPad *pad = (GstAudioAggregatorPad *) object;
|
||||||
|
|
||||||
|
gst_buffer_replace (&pad->priv->buffer, NULL);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (gst_audio_aggregator_pad_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_audio_aggregator_pad_class_init (GstAudioAggregatorPadClass * klass)
|
gst_audio_aggregator_pad_class_init (GstAudioAggregatorPadClass * klass)
|
||||||
{
|
{
|
||||||
|
GObjectClass *gobject_class = (GObjectClass *) klass;
|
||||||
GstAggregatorPadClass *aggpadclass = (GstAggregatorPadClass *) klass;
|
GstAggregatorPadClass *aggpadclass = (GstAggregatorPadClass *) klass;
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GstAudioAggregatorPadPrivate));
|
g_type_class_add_private (klass, sizeof (GstAudioAggregatorPadPrivate));
|
||||||
|
|
||||||
|
gobject_class->finalize = gst_audio_aggregator_pad_finalize;
|
||||||
aggpadclass->flush = GST_DEBUG_FUNCPTR (gst_audio_aggregator_pad_flush_pad);
|
aggpadclass->flush = GST_DEBUG_FUNCPTR (gst_audio_aggregator_pad_flush_pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue