diff options
author | Michael Smith <msmith@xiph.org> | 2008-08-29 00:28:55 +0000 |
---|---|---|
committer | Michael Smith <msmith@xiph.org> | 2008-08-29 00:28:55 +0000 |
commit | 331b016659159035edfb8dff12d607db3941d2cd (patch) | |
tree | ce5b5f47dde2039fa409833258780409c2620a1c /gst/law/alaw.c | |
parent | 9b08b5307fd2151440c8232d8f088fcc30477865 (diff) |
gst/law/: Ref caps before passing to gst_pad_template_new(), since that takes ownership.
Original commit message from CVS:
* gst/law/alaw.c:
* gst/law/mulaw.c:
Ref caps before passing to gst_pad_template_new(), since that takes
ownership.
Diffstat (limited to 'gst/law/alaw.c')
-rw-r--r-- | gst/law/alaw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/law/alaw.c b/gst/law/alaw.c index d67f857d..495d0582 100644 --- a/gst/law/alaw.c +++ b/gst/law/alaw.c @@ -54,16 +54,23 @@ plugin_init (GstPlugin * plugin) alaw_caps = alaw_factory (); linear_caps = linear_factory (); + gst_caps_ref (alaw_caps); + gst_caps_ref (linear_caps); alawenc_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, alaw_caps); alawenc_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, linear_caps); + gst_caps_ref (alaw_caps); + gst_caps_ref (linear_caps); alawdec_src_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, linear_caps); alawdec_sink_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, alaw_caps); + gst_caps_unref (alaw_caps); + gst_caps_unref (linear_caps); + if (!gst_element_register (plugin, "alawenc", GST_RANK_NONE, GST_TYPE_ALAW_ENC) || !gst_element_register (plugin, "alawdec", |