mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
modplug: fix caps leak
This commit is contained in:
parent
1f543ec0ad
commit
57ec7354ee
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue