mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
jack: don't leak caps
Add dispose methods to clear caps.
This commit is contained in:
parent
63a31d3a87
commit
58eb164642
2 changed files with 22 additions and 0 deletions
|
@ -655,6 +655,7 @@ enum
|
|||
GST_BOILERPLATE_FULL (GstJackAudioSink, gst_jack_audio_sink, GstBaseAudioSink,
|
||||
GST_TYPE_BASE_AUDIO_SINK, _do_init);
|
||||
|
||||
static void gst_jack_audio_sink_dispose (GObject * object);
|
||||
static void gst_jack_audio_sink_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
static void gst_jack_audio_sink_get_property (GObject * object, guint prop_id,
|
||||
|
@ -689,6 +690,7 @@ gst_jack_audio_sink_class_init (GstJackAudioSinkClass * klass)
|
|||
gstbasesink_class = (GstBaseSinkClass *) klass;
|
||||
gstbaseaudiosink_class = (GstBaseAudioSinkClass *) klass;
|
||||
|
||||
gobject_class->dispose = gst_jack_audio_sink_dispose;
|
||||
gobject_class->get_property = gst_jack_audio_sink_get_property;
|
||||
gobject_class->set_property = gst_jack_audio_sink_set_property;
|
||||
|
||||
|
@ -724,6 +726,15 @@ gst_jack_audio_sink_init (GstJackAudioSink * sink,
|
|||
sink->port_count = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_jack_audio_sink_dispose (GObject * object)
|
||||
{
|
||||
GstJackAudioSink *sink = GST_JACK_AUDIO_SINK (object);
|
||||
|
||||
gst_caps_replace (&sink->caps, NULL);
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_jack_audio_sink_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
|
|
|
@ -664,6 +664,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_BOILERPLATE_FULL (GstJackAudioSrc, gst_jack_audio_src, GstBaseAudioSrc,
|
||||
GST_TYPE_BASE_AUDIO_SRC, _do_init);
|
||||
|
||||
static void gst_jack_audio_src_dispose (GObject * object);
|
||||
static void gst_jack_audio_src_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
static void gst_jack_audio_src_get_property (GObject * object, guint prop_id,
|
||||
|
@ -703,6 +704,7 @@ gst_jack_audio_src_class_init (GstJackAudioSrcClass * klass)
|
|||
gstbasesrc_class = (GstBaseSrcClass *) klass;
|
||||
gstbaseaudiosrc_class = (GstBaseAudioSrcClass *) klass;
|
||||
|
||||
gobject_class->dispose = gst_jack_audio_src_dispose;
|
||||
gobject_class->set_property = gst_jack_audio_src_set_property;
|
||||
gobject_class->get_property = gst_jack_audio_src_get_property;
|
||||
|
||||
|
@ -742,6 +744,15 @@ gst_jack_audio_src_init (GstJackAudioSrc * src, GstJackAudioSrcClass * gclass)
|
|||
src->port_count = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_jack_audio_src_dispose (GObject * object)
|
||||
{
|
||||
GstJackAudioSrc *src = GST_JACK_AUDIO_SRC (object);
|
||||
|
||||
gst_caps_replace (&src->caps, NULL);
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_jack_audio_src_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
|
|
Loading…
Reference in a new issue