deinterlace: Mark pad as needing reconfiguration again if reconfiguration failed

And consider negotiation failures on flushing pads as FLUSHING, not as
NOT_NEGOTIATED.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
This commit is contained in:
Sebastian Dröge 2016-11-17 19:58:52 +02:00
parent f32603bcf8
commit 858d9f9706

View file

@ -2061,11 +2061,16 @@ gst_deinterlace_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
caps = gst_pad_get_current_caps (self->sinkpad); caps = gst_pad_get_current_caps (self->sinkpad);
if (caps != NULL) { if (caps != NULL) {
if (!gst_deinterlace_setcaps (self, self->sinkpad, caps)) { if (!gst_deinterlace_setcaps (self, self->sinkpad, caps)) {
gst_pad_mark_reconfigure (self->srcpad);
gst_caps_unref (caps); gst_caps_unref (caps);
return GST_FLOW_NOT_NEGOTIATED; if (GST_PAD_IS_FLUSHING (self->srcpad))
return GST_FLOW_FLUSHING;
else
return GST_FLOW_NOT_NEGOTIATED;
} }
gst_caps_unref (caps); gst_caps_unref (caps);
} else { } else {
gst_pad_mark_reconfigure (self->srcpad);
return GST_FLOW_FLUSHING; return GST_FLOW_FLUSHING;
} }
} else { } else {
@ -2788,6 +2793,7 @@ invalid_caps:
if (peercaps) if (peercaps)
gst_caps_unref (peercaps); gst_caps_unref (peercaps);
GST_ERROR_OBJECT (pad, "Invalid caps: %" GST_PTR_FORMAT, caps); GST_ERROR_OBJECT (pad, "Invalid caps: %" GST_PTR_FORMAT, caps);
gst_pad_mark_reconfigure (self->srcpad);
return FALSE; return FALSE;
} }
set_caps_failed: set_caps_failed:
@ -2797,6 +2803,7 @@ set_caps_failed:
gst_caps_unref (peercaps); gst_caps_unref (peercaps);
if (srccaps) if (srccaps)
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
gst_pad_mark_reconfigure (self->srcpad);
return FALSE; return FALSE;
} }
no_bufferpool: no_bufferpool:
@ -2804,6 +2811,7 @@ no_bufferpool:
GST_ERROR_OBJECT (pad, "could not negotiate bufferpool"); GST_ERROR_OBJECT (pad, "could not negotiate bufferpool");
if (srccaps) if (srccaps)
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
gst_pad_mark_reconfigure (self->srcpad);
return FALSE; return FALSE;
} }
} }