mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
audioencoder: don't unref caps parameter
Fix refcounting on incomming caps to make sure we don't unref it too much.
This commit is contained in:
parent
c1aa6e835e
commit
fe3e9b90dd
1 changed files with 2 additions and 1 deletions
|
@ -1163,7 +1163,8 @@ gst_audio_encoder_proxy_getcaps (GstAudioEncoder * enc, GstCaps * caps)
|
||||||
/* we want to be able to communicate to upstream elements like audioconvert
|
/* we want to be able to communicate to upstream elements like audioconvert
|
||||||
* and audioresample any rate/channel restrictions downstream (e.g. muxer
|
* and audioresample any rate/channel restrictions downstream (e.g. muxer
|
||||||
* only accepting certain sample rates) */
|
* only accepting certain sample rates) */
|
||||||
templ_caps = caps ? caps : gst_pad_get_pad_template_caps (enc->sinkpad);
|
templ_caps =
|
||||||
|
caps ? gst_caps_ref (caps) : gst_pad_get_pad_template_caps (enc->sinkpad);
|
||||||
allowed = gst_pad_get_allowed_caps (enc->srcpad);
|
allowed = gst_pad_get_allowed_caps (enc->srcpad);
|
||||||
if (!allowed || gst_caps_is_empty (allowed) || gst_caps_is_any (allowed)) {
|
if (!allowed || gst_caps_is_empty (allowed) || gst_caps_is_any (allowed)) {
|
||||||
fcaps = gst_caps_copy (templ_caps);
|
fcaps = gst_caps_copy (templ_caps);
|
||||||
|
|
Loading…
Reference in a new issue