diff --git a/gst/gdp/gstgdppay.c b/gst/gdp/gstgdppay.c index b2d45444b7..8e92c4cca4 100644 --- a/gst/gdp/gstgdppay.c +++ b/gst/gdp/gstgdppay.c @@ -676,9 +676,9 @@ gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) break; case GST_EVENT_CAPS:{ gst_event_parse_caps (event, &caps); + gst_buffer_replace (&outbuffer, NULL); if (this->caps == NULL || !gst_caps_is_equal (this->caps, caps)) { GST_INFO_OBJECT (pad, "caps changed to %" GST_PTR_FORMAT, caps); - gst_buffer_replace (&outbuffer, NULL); gst_caps_replace (&this->caps, caps); outbuffer = gst_gdp_buffer_from_caps (this, caps); if (outbuffer == NULL)