mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
imagefreeze: Don't call gst_caps_unref() on template caps when already unreferenced
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
This commit is contained in:
parent
116649371e
commit
3a1e010221
1 changed files with 3 additions and 2 deletions
|
@ -174,7 +174,7 @@ gst_image_freeze_sink_setcaps (GstImageFreeze * self, GstCaps * caps)
|
|||
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);
|
||||
|
||||
|
@ -285,6 +285,7 @@ gst_image_freeze_sink_getcaps (GstImageFreeze * self, GstCaps * filter)
|
|||
GST_LOG_OBJECT (self, "going to copy");
|
||||
ret = gst_caps_copy (templ);
|
||||
}
|
||||
if (templ)
|
||||
gst_caps_unref (templ);
|
||||
if (filter)
|
||||
gst_caps_unref (filter);
|
||||
|
|
Loading…
Reference in a new issue