Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gst-plugins-base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sebastian Dröge
gst-plugins-base
Commits
44ae8114
Commit
44ae8114
authored
Nov 16, 2005
by
Thomas Vander Stichele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a whole set of pad template leaks
Original commit message from CVS: Fix a whole set of pad template leaks
parent
80979263
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
66 additions
and
55 deletions
+66
-55
ChangeLog
ChangeLog
+19
-0
ext/libvisual/visual.c
ext/libvisual/visual.c
+2
-6
ext/ogg/gstoggdemux.c
ext/ogg/gstoggdemux.c
+3
-3
ext/ogg/gstoggparse.c
ext/ogg/gstoggparse.c
+3
-4
ext/ogg/gstogmparse.c
ext/ogg/gstogmparse.c
+9
-10
ext/theora/theoradec.c
ext/theora/theoradec.c
+2
-4
ext/theora/theoraenc.c
ext/theora/theoraenc.c
+2
-4
ext/vorbis/vorbisdec.c
ext/vorbis/vorbisdec.c
+4
-6
ext/vorbis/vorbisparse.c
ext/vorbis/vorbisparse.c
+3
-4
gst/adder/gstadder.c
gst/adder/gstadder.c
+13
-0
gst/audiorate/gstaudiorate.c
gst/audiorate/gstaudiorate.c
+2
-4
gst/subparse/gstsubparse.c
gst/subparse/gstsubparse.c
+2
-6
gst/videorate/gstvideorate.c
gst/videorate/gstvideorate.c
+2
-4
No files found.
ChangeLog
View file @
44ae8114
2005-11-16 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/libvisual/visual.c: (gst_visual_init):
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_init):
* ext/ogg/gstoggparse.c: (gst_ogg_parse_init),
(gst_ogg_parse_chain):
* ext/ogg/gstogmparse.c: (gst_ogm_audio_parse_init),
(gst_ogm_video_parse_init), (gst_ogm_text_parse_init):
* ext/theora/theoradec.c: (gst_theora_dec_init):
* ext/theora/theoraenc.c: (gst_theora_enc_init):
* ext/vorbis/vorbisdec.c: (gst_vorbis_dec_init):
* ext/vorbis/vorbisparse.c: (gst_vorbis_parse_init):
* gst/adder/gstadder.c: (gst_adder_class_init),
(gst_adder_dispose):
* gst/audiorate/gstaudiorate.c: (gst_audiorate_init):
* gst/subparse/gstsubparse.c: (gst_subparse_init):
* gst/videorate/gstvideorate.c: (gst_videorate_init):
Fix a whole set of pad template leaks
2005-11-16 Thomas Vander Stichele <thomas at apestaart dot org>
* check/generic/states.c: (GST_START_TEST):
...
...
ext/libvisual/visual.c
View file @
44ae8114
...
...
@@ -185,16 +185,12 @@ static void
gst_visual_init
(
GstVisual
*
visual
)
{
/* create the sink and src pads */
visual
->
sinkpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
sink_template
),
"sink"
);
visual
->
sinkpad
=
gst_pad_new_from_static_template
(
&
sink_template
,
"sink"
);
gst_pad_set_setcaps_function
(
visual
->
sinkpad
,
gst_visual_sink_setcaps
);
gst_pad_set_chain_function
(
visual
->
sinkpad
,
gst_visual_chain
);
gst_element_add_pad
(
GST_ELEMENT
(
visual
),
visual
->
sinkpad
);
visual
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
src_template
),
"src"
);
visual
->
srcpad
=
gst_pad_new_from_static_template
(
&
src_template
,
"src"
);
gst_pad_set_setcaps_function
(
visual
->
srcpad
,
gst_visual_src_setcaps
);
gst_pad_set_getcaps_function
(
visual
->
srcpad
,
gst_visual_getcaps
);
gst_element_add_pad
(
GST_ELEMENT
(
visual
),
visual
->
srcpad
);
...
...
ext/ogg/gstoggdemux.c
View file @
44ae8114
...
...
@@ -1132,9 +1132,9 @@ static void
gst_ogg_demux_init
(
GstOggDemux
*
ogg
,
GstOggDemuxClass
*
g_class
)
{
/* create the sink pad */
GstPadTemplate
*
template
=
gst_static_pad_template_get
(
&
ogg_demux_sink_template_factory
);
ogg
->
sinkpad
=
gst_pad_new_from_template
(
template
,
"sink"
);
ogg
->
sinkpad
=
gst_pad_new_from_static_template
(
&
ogg_demux_sink_template_factory
,
"sink"
);
gst_pad_set_event_function
(
ogg
->
sinkpad
,
gst_ogg_demux_handle_event
);
gst_pad_set_chain_function
(
ogg
->
sinkpad
,
gst_ogg_demux_chain
);
...
...
ext/ogg/gstoggparse.c
View file @
44ae8114
...
...
@@ -243,11 +243,10 @@ gst_ogg_parse_init (GstOggParse * ogg)
{
/* create the sink and source pads */
ogg
->
sinkpad
=
gst_pad_new_from_
template
(
gst_static_pad_template_get
(
&
ogg_parse_sink_template_factory
),
"sink"
);
gst_pad_new_from_
static_template
(
&
ogg_parse_sink_template_factory
,
"sink"
);
ogg
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
ogg_parse_src_template_factory
),
"src"
);
gst_pad_new_from_static_template
(
&
ogg_parse_src_template_factory
,
"src"
);
/* TODO: Are there any events we must handle? */
/* gst_pad_set_event_function (ogg->sinkpad, gst_ogg_parse_handle_event); */
...
...
ext/ogg/gstogmparse.c
View file @
44ae8114
...
...
@@ -344,8 +344,9 @@ gst_ogm_audio_parse_init (GstOgmParse * ogm)
GstPadTemplate
*
templ
;
/* create the pads */
templ
=
gst_static_pad_template_get
(
&
ogm_audio_parse_sink_template_factory
);
ogm
->
sinkpad
=
gst_pad_new_from_template
(
templ
,
"sink"
);
ogm
->
sinkpad
=
gst_pad_new_from_template
(
&
ogm_audio_parse_sink_template_factory
,
"sink"
);
gst_pad_set_query_function
(
ogm
->
sinkpad
,
gst_ogm_parse_sink_query
);
gst_pad_set_chain_function
(
ogm
->
sinkpad
,
gst_ogm_parse_chain
);
gst_element_add_pad
(
GST_ELEMENT
(
ogm
),
ogm
->
sinkpad
);
...
...
@@ -361,11 +362,10 @@ gst_ogm_audio_parse_init (GstOgmParse * ogm)
static
void
gst_ogm_video_parse_init
(
GstOgmParse
*
ogm
)
{
GstPadTemplate
*
templ
;
/* create the pads */
templ
=
gst_static_pad_template_get
(
&
ogm_video_parse_sink_template_factory
);
ogm
->
sinkpad
=
gst_pad_new_from_template
(
templ
,
"sink"
);
ogm
->
sinkpad
=
gst_pad_new_from_static_template
(
&
ogm_video_parse_sink_template_factory
,
"sink"
);
gst_pad_set_query_function
(
ogm
->
sinkpad
,
gst_ogm_parse_sink_query
);
gst_pad_set_chain_function
(
ogm
->
sinkpad
,
gst_ogm_parse_chain
);
gst_element_add_pad
(
GST_ELEMENT
(
ogm
),
ogm
->
sinkpad
);
...
...
@@ -381,11 +381,10 @@ gst_ogm_video_parse_init (GstOgmParse * ogm)
static
void
gst_ogm_text_parse_init
(
GstOgmParse
*
ogm
)
{
GstPadTemplate
*
templ
;
/* create the pads */
templ
=
gst_static_pad_template_get
(
&
ogm_text_parse_sink_template_factory
);
ogm
->
sinkpad
=
gst_pad_new_from_template
(
templ
,
"sink"
);
ogm
->
sinkpad
=
gst_pad_new_from_static_template
(
&
ogm_text_parse_sink_template_factory
,
"sink"
);
gst_pad_set_query_type_function
(
ogm
->
sinkpad
,
gst_ogm_parse_get_sink_querytypes
);
gst_pad_set_query_function
(
ogm
->
sinkpad
,
gst_ogm_parse_sink_query
);
...
...
ext/theora/theoradec.c
View file @
44ae8114
...
...
@@ -176,16 +176,14 @@ static void
gst_theora_dec_init
(
GstTheoraDec
*
dec
,
GstTheoraDecClass
*
g_class
)
{
dec
->
sinkpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
theora_dec_sink_factory
),
"sink"
);
gst_pad_new_from_static_template
(
&
theora_dec_sink_factory
,
"sink"
);
gst_pad_set_query_function
(
dec
->
sinkpad
,
theora_dec_sink_query
);
gst_pad_set_event_function
(
dec
->
sinkpad
,
theora_dec_sink_event
);
gst_pad_set_chain_function
(
dec
->
sinkpad
,
theora_dec_chain
);
gst_element_add_pad
(
GST_ELEMENT
(
dec
),
dec
->
sinkpad
);
dec
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
theora_dec_src_factory
),
"src"
);
gst_pad_new_from_static_template
(
&
theora_dec_src_factory
,
"src"
);
gst_pad_set_getcaps_function
(
dec
->
srcpad
,
theora_dec_src_getcaps
);
gst_pad_set_event_function
(
dec
->
srcpad
,
theora_dec_src_event
);
gst_pad_set_query_type_function
(
dec
->
srcpad
,
theora_get_query_types
);
...
...
ext/theora/theoraenc.c
View file @
44ae8114
...
...
@@ -213,16 +213,14 @@ static void
gst_theora_enc_init
(
GstTheoraEnc
*
enc
,
GstTheoraEncClass
*
g_class
)
{
enc
->
sinkpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
theora_enc_sink_factory
),
"sink"
);
gst_pad_new_from_static_template
(
&
theora_enc_sink_factory
,
"sink"
);
gst_pad_set_chain_function
(
enc
->
sinkpad
,
theora_enc_chain
);
gst_pad_set_event_function
(
enc
->
sinkpad
,
theora_enc_sink_event
);
gst_pad_set_setcaps_function
(
enc
->
sinkpad
,
theora_enc_sink_setcaps
);
gst_element_add_pad
(
GST_ELEMENT
(
enc
),
enc
->
sinkpad
);
enc
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
theora_enc_src_factory
),
"src"
);
gst_pad_new_from_static_template
(
&
theora_enc_src_factory
,
"src"
);
gst_element_add_pad
(
GST_ELEMENT
(
enc
),
enc
->
srcpad
);
enc
->
center
=
THEORA_DEF_CENTER
;
...
...
ext/vorbis/vorbisdec.c
View file @
44ae8114
...
...
@@ -165,18 +165,16 @@ vorbis_get_query_types (GstPad * pad)
static
void
gst_vorbis_dec_init
(
GstVorbisDec
*
dec
,
GstVorbisDecClass
*
g_class
)
{
GstPadTemplate
*
template
;
template
=
gst_static_pad_template_get
(
&
vorbis_dec_sink_factory
);
dec
->
sinkpad
=
gst_pad_new_from_template
(
template
,
"sink"
);
dec
->
sinkpad
=
gst_pad_new_from_static_template
(
&
vorbis_dec_sink_factory
,
"sink"
);
gst_pad_set_event_function
(
dec
->
sinkpad
,
vorbis_dec_sink_event
);
gst_pad_set_chain_function
(
dec
->
sinkpad
,
vorbis_dec_chain
);
gst_pad_set_query_function
(
dec
->
sinkpad
,
vorbis_dec_sink_query
);
gst_element_add_pad
(
GST_ELEMENT
(
dec
),
dec
->
sinkpad
);
template
=
gst_static_pad_template_get
(
&
vorbis_dec_src_factory
);
dec
->
srcpad
=
gst_pad_new_from_template
(
template
,
"src"
);
dec
->
srcpad
=
gst_pad_new_from_static_template
(
&
vorbis_dec_src_factory
,
"src"
);
gst_pad_set_event_function
(
dec
->
srcpad
,
vorbis_dec_src_event
);
gst_pad_set_query_type_function
(
dec
->
srcpad
,
vorbis_get_query_types
);
...
...
ext/vorbis/vorbisparse.c
View file @
44ae8114
...
...
@@ -90,16 +90,15 @@ static void
gst_vorbis_parse_init
(
GstVorbisParse
*
parse
,
GstVorbisParseClass
*
g_class
)
{
parse
->
sinkpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
vorbis_parse_sink_factory
),
"sink"
);
gst_pad_new_from_static_template
(
&
vorbis_parse_sink_factory
,
"sink"
);
gst_pad_set_chain_function
(
parse
->
sinkpad
,
vorbis_parse_chain
);
gst_element_add_pad
(
GST_ELEMENT
(
parse
),
parse
->
sinkpad
);
parse
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
vorbis_parse_src_factory
),
"src"
);
gst_pad_new_from_static_template
(
&
vorbis_parse_src_factory
,
"src"
);
gst_element_add_pad
(
GST_ELEMENT
(
parse
),
parse
->
srcpad
);
}
static
void
vorbis_parse_set_header_on_caps
(
GstVorbisParse
*
parse
,
GstCaps
*
caps
)
{
...
...
gst/adder/gstadder.c
View file @
44ae8114
...
...
@@ -71,6 +71,7 @@ static GstStaticPadTemplate gst_adder_sink_template =
static
void
gst_adder_class_init
(
GstAdderClass
*
klass
);
static
void
gst_adder_init
(
GstAdder
*
adder
);
static
void
gst_adder_dispose
(
GObject
*
object
);
static
GstPad
*
gst_adder_request_new_pad
(
GstElement
*
element
,
GstPadTemplate
*
temp
,
const
gchar
*
unused
);
...
...
@@ -249,6 +250,9 @@ gst_adder_class_init (GstAdderClass * klass)
GstElementClass
*
gstelement_class
;
gobject_class
=
(
GObjectClass
*
)
klass
;
gobject_class
->
dispose
=
gst_adder_dispose
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gst_element_class_add_pad_template
(
gstelement_class
,
...
...
@@ -286,6 +290,15 @@ gst_adder_init (GstAdder * adder)
gst_collectpads_set_function
(
adder
->
collect
,
gst_adder_collected
,
adder
);
}
static
void
gst_adder_dispose
(
GObject
*
object
)
{
GstAdder
*
adder
=
GST_ADDER
(
object
);
gst_object_unref
(
adder
->
collect
);
adder
->
collect
=
NULL
;
}
static
GstPad
*
gst_adder_request_new_pad
(
GstElement
*
element
,
GstPadTemplate
*
templ
,
const
gchar
*
unused
)
...
...
gst/audiorate/gstaudiorate.c
View file @
44ae8114
...
...
@@ -220,16 +220,14 @@ static void
gst_audiorate_init
(
GstAudiorate
*
audiorate
)
{
audiorate
->
sinkpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
gst_audiorate_sink_template
),
"sink"
);
gst_pad_new_from_static_template
(
&
gst_audiorate_sink_template
,
"sink"
);
gst_element_add_pad
(
GST_ELEMENT
(
audiorate
),
audiorate
->
sinkpad
);
gst_pad_set_chain_function
(
audiorate
->
sinkpad
,
gst_audiorate_chain
);
gst_pad_set_setcaps_function
(
audiorate
->
sinkpad
,
gst_audiorate_setcaps
);
gst_pad_set_getcaps_function
(
audiorate
->
sinkpad
,
gst_pad_proxy_getcaps
);
audiorate
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
gst_audiorate_src_template
),
"src"
);
gst_pad_new_from_static_template
(
&
gst_audiorate_src_template
,
"src"
);
gst_element_add_pad
(
GST_ELEMENT
(
audiorate
),
audiorate
->
srcpad
);
gst_pad_set_setcaps_function
(
audiorate
->
srcpad
,
gst_audiorate_setcaps
);
gst_pad_set_getcaps_function
(
audiorate
->
srcpad
,
gst_pad_proxy_getcaps
);
...
...
gst/subparse/gstsubparse.c
View file @
44ae8114
...
...
@@ -125,15 +125,11 @@ gst_subparse_class_init (GstSubparseClass * klass)
static
void
gst_subparse_init
(
GstSubparse
*
subparse
)
{
subparse
->
sinkpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
sink_templ
),
"sink"
);
subparse
->
sinkpad
=
gst_pad_new_from_static_template
(
&
sink_templ
,
"sink"
);
gst_pad_set_chain_function
(
subparse
->
sinkpad
,
gst_subparse_chain
);
gst_element_add_pad
(
GST_ELEMENT
(
subparse
),
subparse
->
sinkpad
);
subparse
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
src_templ
),
"src"
);
subparse
->
srcpad
=
gst_pad_new_from_static_template
(
&
src_templ
,
"src"
);
gst_pad_set_event_function
(
subparse
->
srcpad
,
gst_subparse_src_event
);
gst_element_add_pad
(
GST_ELEMENT
(
subparse
),
subparse
->
srcpad
);
...
...
gst/videorate/gstvideorate.c
View file @
44ae8114
...
...
@@ -361,8 +361,7 @@ gst_videorate_init (GstVideorate * videorate)
{
GST_DEBUG
(
"gst_videorate_init"
);
videorate
->
sinkpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
gst_videorate_sink_template
),
"sink"
);
gst_pad_new_from_static_template
(
&
gst_videorate_sink_template
,
"sink"
);
gst_element_add_pad
(
GST_ELEMENT
(
videorate
),
videorate
->
sinkpad
);
gst_pad_set_event_function
(
videorate
->
sinkpad
,
gst_videorate_event
);
gst_pad_set_chain_function
(
videorate
->
sinkpad
,
gst_videorate_chain
);
...
...
@@ -370,8 +369,7 @@ gst_videorate_init (GstVideorate * videorate)
gst_pad_set_setcaps_function
(
videorate
->
sinkpad
,
gst_videorate_setcaps
);
videorate
->
srcpad
=
gst_pad_new_from_template
(
gst_static_pad_template_get
(
&
gst_videorate_src_template
),
"src"
);
gst_pad_new_from_static_template
(
&
gst_videorate_src_template
,
"src"
);
gst_element_add_pad
(
GST_ELEMENT
(
videorate
),
videorate
->
srcpad
);
gst_pad_set_getcaps_function
(
videorate
->
srcpad
,
gst_videorate_getcaps
);
gst_pad_set_setcaps_function
(
videorate
->
srcpad
,
gst_videorate_setcaps
);
...
...
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