baseparse: Don't forget error returns when processing more

If parsing returns a non-OK flow return in the middle
of processing an input buffer, don't overwrite that
if a later return is OK again - the subclass might
return not-linked in the middle, and then discard
subsequent data without pushing while returning OK.

A later success doesn't invalidate the earlier failure,
but we should continue processing after not-linked, so
as to keep parse state consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=779831
This commit is contained in:
Jan Schmidt 2017-03-17 22:32:19 +11:00
parent b84cb75200
commit e571002dcb

View file

@ -3237,7 +3237,8 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
ret = old_ret;
goto done;
}
old_ret = ret;
if (old_ret == GST_FLOW_OK)
old_ret = ret;
}
done: