mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
ext/esd/esdmon.c: fix nonterminated vararg and memleak
Original commit message from CVS: * ext/esd/esdmon.c: (gst_esdmon_get): fix nonterminated vararg and memleak
This commit is contained in:
parent
65d6fd009d
commit
e6b112c25e
2 changed files with 16 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-04-05 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
|
* ext/esd/esdmon.c: (gst_esdmon_get):
|
||||||
|
fix nonterminated vararg and memleak
|
||||||
|
|
||||||
2004-04-05 Benjamin Otte <otte@gnome.org>
|
2004-04-05 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
* ext/ladspa/gstladspa.c: (gst_ladspa_class_init),
|
* ext/ladspa/gstladspa.c: (gst_ladspa_class_init),
|
||||||
|
|
|
@ -245,20 +245,22 @@ gst_esdmon_get (GstPad * pad)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!GST_PAD_CAPS (pad)) {
|
if (!GST_PAD_CAPS (pad)) {
|
||||||
gint sign = (esdmon->depth == 8 ? FALSE : TRUE);
|
GstCaps *caps = gst_caps_new_simple ("audio/x-raw-int",
|
||||||
|
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
||||||
|
"signed", G_TYPE_BOOLEAN, esdmon->depth == 8 ? FALSE : TRUE,
|
||||||
|
"width", G_TYPE_INT, esdmon->depth,
|
||||||
|
"depth", G_TYPE_INT, esdmon->depth,
|
||||||
|
"rate", G_TYPE_INT, esdmon->frequency,
|
||||||
|
"channels", G_TYPE_INT, esdmon->channels,
|
||||||
|
NULL);
|
||||||
|
|
||||||
/* set caps on src pad */
|
/* set caps on src pad */
|
||||||
if (gst_pad_set_explicit_caps (esdmon->srcpad,
|
if (gst_pad_set_explicit_caps (esdmon->srcpad, caps) <= 0) {
|
||||||
gst_caps_new_simple ("audio/x-raw-int",
|
|
||||||
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
|
||||||
"signed", G_TYPE_BOOLEAN, sign,
|
|
||||||
"width", G_TYPE_INT, esdmon->depth,
|
|
||||||
"depth", G_TYPE_INT, esdmon->depth,
|
|
||||||
"rate", G_TYPE_INT, esdmon->frequency,
|
|
||||||
"channels", G_TYPE_INT, esdmon->channels)) <= 0) {
|
|
||||||
GST_ELEMENT_ERROR (esdmon, CORE, NEGOTIATION, (NULL), (NULL));
|
GST_ELEMENT_ERROR (esdmon, CORE, NEGOTIATION, (NULL), (NULL));
|
||||||
|
gst_caps_free (caps);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
gst_caps_free (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_BUFFER_SIZE (buf) = readbytes;
|
GST_BUFFER_SIZE (buf) = readbytes;
|
||||||
|
|
Loading…
Reference in a new issue