diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2012-01-10 17:27:54 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2012-01-10 17:27:54 +0000 |
commit | 57ec7354eef8270ce2ca22221d19f3b121253c07 (patch) | |
tree | 26c5a44fab5b5180a91774348dc52076309381c2 /ext/modplug | |
parent | 1f543ec0ada7849a25a6451679eeb3cd3f605c1f (diff) | |
download | gstreamer-plugins-bad-57ec7354eef8270ce2ca22221d19f3b121253c07.tar.gz |
modplug: fix caps leak
Diffstat (limited to 'ext/modplug')
-rw-r--r-- | ext/modplug/gstmodplug.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/modplug/gstmodplug.cc b/ext/modplug/gstmodplug.cc index 09dc5104c..09836a910 100644 --- a/ext/modplug/gstmodplug.cc +++ b/ext/modplug/gstmodplug.cc @@ -490,7 +490,6 @@ gst_modplug_load_song (GstModPlug * modplug) gst_caps_copy_nth (gst_pad_get_pad_template_caps (modplug->srcpad), 0); } gst_pad_fixate_caps (modplug->srcpad, newcaps); - gst_pad_set_caps (modplug->srcpad, newcaps); /* set up modplug to output the negotiated format */ structure = gst_caps_get_structure (newcaps, 0); @@ -498,6 +497,9 @@ gst_modplug_load_song (GstModPlug * modplug) gst_structure_get_int (structure, "channels", &modplug->channel); gst_structure_get_int (structure, "rate", &modplug->frequency); + gst_pad_set_caps (modplug->srcpad, newcaps); + gst_caps_unref (newcaps); + modplug->read_samples = 1152; modplug->read_bytes = modplug->read_samples * modplug->channel * modplug->bits / 8; |