diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index e4e16542f4..65cfd92039 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -2521,9 +2521,18 @@ gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps) GstCaps *srccaps = NULL; GstVideoInterlaceMode interlacing_mode; gint fps_n, fps_d; - GstCaps *peercaps; + GstCaps *peercaps, *current_caps; gst_pad_check_reconfigure (self->srcpad); + + if ((current_caps = gst_pad_get_current_caps (pad))) { + if (gst_caps_is_equal (caps, current_caps)) { + GST_DEBUG_OBJECT (pad, "Got same caps again, returning"); + gst_caps_unref (current_caps); + return TRUE; + } + gst_deinterlace_reset_history (self, FALSE); + } peercaps = gst_pad_peer_query_caps (self->srcpad, NULL); /* Make sure the peer caps are compatible with the template caps */