mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
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.
This commit is contained in:
parent
9b08b5307f
commit
331b016659
3 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-08-28 Michael Smith <msmith@songbirdnest.com>
|
||||||
|
|
||||||
|
* gst/law/alaw.c:
|
||||||
|
* gst/law/mulaw.c:
|
||||||
|
Ref caps before passing to gst_pad_template_new(), since that takes
|
||||||
|
ownership.
|
||||||
|
|
||||||
2008-08-28 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-08-28 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
Patch by: Mersad Jelacic <mersad at axis dot com>
|
Patch by: Mersad Jelacic <mersad at axis dot com>
|
||||||
|
|
|
@ -54,16 +54,23 @@ plugin_init (GstPlugin * plugin)
|
||||||
alaw_caps = alaw_factory ();
|
alaw_caps = alaw_factory ();
|
||||||
linear_caps = linear_factory ();
|
linear_caps = linear_factory ();
|
||||||
|
|
||||||
|
gst_caps_ref (alaw_caps);
|
||||||
|
gst_caps_ref (linear_caps);
|
||||||
alawenc_src_template =
|
alawenc_src_template =
|
||||||
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, alaw_caps);
|
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, alaw_caps);
|
||||||
alawenc_sink_template =
|
alawenc_sink_template =
|
||||||
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, linear_caps);
|
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 =
|
alawdec_src_template =
|
||||||
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, linear_caps);
|
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, linear_caps);
|
||||||
alawdec_sink_template =
|
alawdec_sink_template =
|
||||||
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, alaw_caps);
|
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",
|
if (!gst_element_register (plugin, "alawenc",
|
||||||
GST_RANK_NONE, GST_TYPE_ALAW_ENC) ||
|
GST_RANK_NONE, GST_TYPE_ALAW_ENC) ||
|
||||||
!gst_element_register (plugin, "alawdec",
|
!gst_element_register (plugin, "alawdec",
|
||||||
|
|
|
@ -35,16 +35,23 @@ plugin_init (GstPlugin * plugin)
|
||||||
mulaw_caps = mulaw_factory ();
|
mulaw_caps = mulaw_factory ();
|
||||||
linear_caps = linear_factory ();
|
linear_caps = linear_factory ();
|
||||||
|
|
||||||
|
gst_caps_ref (mulaw_caps);
|
||||||
|
gst_caps_ref (linear_caps);
|
||||||
mulawenc_src_template =
|
mulawenc_src_template =
|
||||||
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, mulaw_caps);
|
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, mulaw_caps);
|
||||||
mulawenc_sink_template =
|
mulawenc_sink_template =
|
||||||
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, linear_caps);
|
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, linear_caps);
|
||||||
|
|
||||||
|
gst_caps_ref (mulaw_caps);
|
||||||
|
gst_caps_ref (linear_caps);
|
||||||
mulawdec_src_template =
|
mulawdec_src_template =
|
||||||
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, linear_caps);
|
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, linear_caps);
|
||||||
mulawdec_sink_template =
|
mulawdec_sink_template =
|
||||||
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, mulaw_caps);
|
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, mulaw_caps);
|
||||||
|
|
||||||
|
gst_caps_unref (mulaw_caps);
|
||||||
|
gst_caps_unref (linear_caps);
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "mulawenc",
|
if (!gst_element_register (plugin, "mulawenc",
|
||||||
GST_RANK_NONE, GST_TYPE_MULAWENC) ||
|
GST_RANK_NONE, GST_TYPE_MULAWENC) ||
|
||||||
!gst_element_register (plugin, "mulawdec",
|
!gst_element_register (plugin, "mulawdec",
|
||||||
|
|
Loading…
Reference in a new issue