mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 17:14:23 +00:00
ext/mad/gstmad.c: fixed caps leak
Original commit message from CVS: 2004-03-06 Christophe Fergeau <teuf@gnome.org> * ext/mad/gstmad.c: (gst_mad_chain): fixed caps leak
This commit is contained in:
parent
91ade2eb86
commit
e81c3184bb
2 changed files with 18 additions and 10 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-03-06 Christophe Fergeau <teuf@gnome.org>
|
||||||
|
|
||||||
|
* ext/mad/gstmad.c: (gst_mad_chain): fixed caps leak
|
||||||
|
|
||||||
2004-03-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-03-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_new):
|
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_new):
|
||||||
|
|
|
@ -1234,20 +1234,24 @@ gst_mad_chain (GstPad *pad, GstData *_data)
|
||||||
gst_mad_update_info (mad);
|
gst_mad_update_info (mad);
|
||||||
|
|
||||||
if (mad->channels != nchannels || mad->rate != rate) {
|
if (mad->channels != nchannels || mad->rate != rate) {
|
||||||
if (mad->stream.options & MAD_OPTION_HALFSAMPLERATE)
|
GstCaps *caps;
|
||||||
|
|
||||||
|
if (mad->stream.options & MAD_OPTION_HALFSAMPLERATE)
|
||||||
rate >>=1;
|
rate >>=1;
|
||||||
|
|
||||||
/* we set the caps even when the pad is not connected so they
|
/* we set the caps even when the pad is not connected so they
|
||||||
* can be gotten for streaminfo */
|
* can be gotten for streaminfo */
|
||||||
gst_pad_set_explicit_caps (mad->srcpad,
|
caps = gst_caps_new_simple ("audio/x-raw-int",
|
||||||
gst_caps_new_simple ("audio/x-raw-int",
|
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
||||||
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
"signed", G_TYPE_BOOLEAN, TRUE,
|
||||||
"signed", G_TYPE_BOOLEAN, TRUE,
|
"width", G_TYPE_INT, 16,
|
||||||
"width", G_TYPE_INT, 16,
|
"depth", G_TYPE_INT, 16,
|
||||||
"depth", G_TYPE_INT, 16,
|
"rate", G_TYPE_INT, rate,
|
||||||
"rate", G_TYPE_INT, rate,
|
"channels", G_TYPE_INT, nchannels,
|
||||||
"channels", G_TYPE_INT, nchannels,
|
NULL);
|
||||||
NULL));
|
|
||||||
|
gst_pad_set_explicit_caps (mad->srcpad, caps);
|
||||||
|
gst_caps_free (caps);
|
||||||
mad->channels = nchannels;
|
mad->channels = nchannels;
|
||||||
mad->rate = rate;
|
mad->rate = rate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue