baseparse: also perform state processing upon non-OK return

... since processing might still continue (if e.g. NOT_LINKED)
and then proper state (e.g. offset) needs to be maintained
(e.g. to arrange for a new frame setup).
This commit is contained in:
Mark Nauwelaerts 2012-06-04 11:13:02 +02:00
parent 5a8c901507
commit 584892bf79

View file

@ -1778,11 +1778,6 @@ gst_base_parse_handle_buffer (GstBaseParse * parse, GstBuffer * buffer,
GST_LOG_OBJECT (parse, "handle_frame skipped %d, flushed %d",
*skip, *flushed);
if (ret != GST_FLOW_OK) {
GST_DEBUG_OBJECT (parse, "handle_frame returned %d", ret);
goto exit;
}
/* subclass can only do one of these, or semantics are too unclear */
g_assert (*skip == 0 || *flushed == 0);
@ -1817,7 +1812,6 @@ gst_base_parse_handle_buffer (GstBaseParse * parse, GstBuffer * buffer,
parse->priv->offset += *flushed;
exit:
if (parse->priv->pad_mode == GST_PAD_MODE_PULL) {
gst_adapter_clear (parse->priv->adapter);
}