From e571002dcbe78fe8a205c43eae3962f3b8d815ae Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 17 Mar 2017 22:32:19 +1100 Subject: [PATCH] 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 --- libs/gst/base/gstbaseparse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 7386168d73..df67dd081a 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -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: