gst_transcode_bin_link_encodebin_pad (GstTranscodeBin * self, GstPad * pad,
GstEvent * sstart)
{
- GstCaps *caps;
+ GstCaps *caps, *filtercaps;
GstPadLinkReturn lret;
const gchar *stream_id;
TranscodingStream *stream;
}
}
- caps = gst_pad_query_caps (pad, NULL);
- pad = _insert_filter (self, stream->encodebin_pad, pad, caps);
+ filtercaps = gst_pad_query_caps (pad, NULL);
+ pad = _insert_filter (self, stream->encodebin_pad, pad, filtercaps);
+ gst_caps_unref (filtercaps);
lret = gst_pad_link (pad, stream->encodebin_pad);
switch (lret) {
case GST_PAD_LINK_OK:
sinkpad = get_encodebin_pad_for_caps (self, caps);
}
+ gst_caps_unref (caps);
return sinkpad;
}
restrictions = gst_encoding_profile_get_restriction (profile);
- if (restrictions && gst_caps_is_any (restrictions)) {
+ if (restrictions) {
+ gboolean is_any = gst_caps_is_any (restrictions);
gst_caps_unref (restrictions);
- continue;
+ if (is_any)
+ continue;
}
encodecaps = gst_encoding_profile_get_format (profile);