diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 42b549f2c0..662a1c4d22 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -2801,16 +2801,16 @@ set_caps_failed: GST_ERROR_OBJECT (pad, "Failed to set caps: %" GST_PTR_FORMAT, srccaps); if (peercaps) gst_caps_unref (peercaps); - if (srccaps) - gst_caps_unref (srccaps); + gst_caps_unref (srccaps); gst_pad_mark_reconfigure (self->srcpad); return FALSE; } no_bufferpool: { GST_ERROR_OBJECT (pad, "could not negotiate bufferpool"); - if (srccaps) - gst_caps_unref (srccaps); + if (peercaps) + gst_caps_unref (peercaps); + gst_caps_unref (srccaps); gst_pad_mark_reconfigure (self->srcpad); return FALSE; }