From: Christophe Fergeau Date: Sat, 6 Mar 2004 18:22:51 +0000 (+0000) Subject: ext/mad/gstmad.c: fixed caps leak X-Git-Tag: 1.19.3~505^2~3791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e81c3184bbc500c387dcb3406cae3d8b82e5c8a4;p=platform%2Fupstream%2Fgstreamer.git ext/mad/gstmad.c: fixed caps leak Original commit message from CVS: 2004-03-06 Christophe Fergeau * ext/mad/gstmad.c: (gst_mad_chain): fixed caps leak --- diff --git a/ChangeLog b/ChangeLog index 794fba0..30c0f66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-03-06 Christophe Fergeau + + * ext/mad/gstmad.c: (gst_mad_chain): fixed caps leak + 2004-03-06 Thomas Vander Stichele * ext/ogg/gstoggdemux.c: (gst_ogg_pad_new): diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index 7ef1b6d..703b2c2 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -1234,20 +1234,24 @@ gst_mad_chain (GstPad *pad, GstData *_data) gst_mad_update_info (mad); 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; /* we set the caps even when the pad is not connected so they * can be gotten for streaminfo */ - gst_pad_set_explicit_caps (mad->srcpad, - gst_caps_new_simple ("audio/x-raw-int", - "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - "rate", G_TYPE_INT, rate, - "channels", G_TYPE_INT, nchannels, - NULL)); + caps = gst_caps_new_simple ("audio/x-raw-int", + "endianness", G_TYPE_INT, G_BYTE_ORDER, + "signed", G_TYPE_BOOLEAN, TRUE, + "width", G_TYPE_INT, 16, + "depth", G_TYPE_INT, 16, + "rate", G_TYPE_INT, rate, + "channels", G_TYPE_INT, nchannels, + NULL); + + gst_pad_set_explicit_caps (mad->srcpad, caps); + gst_caps_free (caps); mad->channels = nchannels; mad->rate = rate; }