Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-base
Commits
ff9ee1dc
Commit
ff9ee1dc
authored
Apr 07, 2009
by
Stefan Kost
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiofilter: don't leak pad-template
gst_element_class_add_pad_template() does not take ownership.
parent
164f1dbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
gst-libs/gst/audio/gstaudiofilter.c
gst-libs/gst/audio/gstaudiofilter.c
+9
-6
No files found.
gst-libs/gst/audio/gstaudiofilter.c
View file @
ff9ee1dc
...
...
@@ -220,16 +220,19 @@ gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
const
GstCaps
*
allowed_caps
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
GstPadTemplate
*
pad_template
;
g_return_if_fail
(
GST_IS_AUDIO_FILTER_CLASS
(
klass
));
g_return_if_fail
(
allowed_caps
!=
NULL
);
g_return_if_fail
(
GST_IS_CAPS
(
allowed_caps
));
gst_element_class_add_pad_template
(
element_class
,
gst_pad_template_new
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
gst_caps_copy
(
allowed_caps
)));
pad_template
=
gst_pad_template_new
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
gst_caps_copy
(
allowed_caps
));
gst_element_class_add_pad_template
(
element_class
,
pad_template
);
gst_object_unref
(
pad_template
);
gst_element_class_add_pad_template
(
element_class
,
gst_pad_template_new
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
gst_caps_copy
(
allowed_caps
)));
pad_template
=
gst_pad_template_new
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
gst_caps_copy
(
allowed_caps
));
gst_element_class_add_pad_template
(
element_class
,
pad_template
);
gst_object_unref
(
pad_template
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment