Adding an extra condition while calling gst_caps_unref (templ)
and replacing gst_caps_make_writable (gst_caps_ref (caps)) with
gst_caps_copy (caps) in line 177, since the functionality is same.
https://bugzilla.gnome.org/show_bug.cgi?id=735795
GstPad *pad;
pad = self->sinkpad;
- caps = gst_caps_make_writable (gst_caps_ref (caps));
+ caps = gst_caps_copy (caps);
GST_DEBUG_OBJECT (pad, "Setting caps: %" GST_PTR_FORMAT, caps);
GST_LOG_OBJECT (self, "going to copy");
ret = gst_caps_copy (templ);
}
- gst_caps_unref (templ);
+ if (templ)
+ gst_caps_unref (templ);
if (filter)
gst_caps_unref (filter);