Commit 9ea6af28 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Revert "baseparse: fix draining with less data than min frame size available"

This reverts commit 2e278aeb.

Some parsers, specifically audio parsers, assume to get all remaining
data on EOS and just pass them onwards. While the idea here is correct,
we will probably need a property for this on baseparse for parsers to
opt-in.

https://bugzilla.gnome.org/show_bug.cgi?id=773666
parent 5a5ae1be
......@@ -3184,17 +3184,9 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
av = gst_adapter_available (parse->priv->adapter);
if (G_UNLIKELY (parse->priv->drain)) {
GST_DEBUG_OBJECT (parse, "draining, data left: %u, min %u", av, min_size);
/* pass all available data to subclass, not just the minimum,
* but never pass less than the minimum required to the subclass */
if (av >= min_size) {
min_size = av;
if (G_UNLIKELY (!min_size))
goto done;
} else if (av > 0) {
GST_DEBUG_OBJECT (parse, "draining, but not enough data available, "
"discarding %u bytes", av);
gst_adapter_clear (parse->priv->adapter);
min_size = av;
GST_DEBUG_OBJECT (parse, "draining, data left: %d", min_size);
if (G_UNLIKELY (!min_size)) {
goto done;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment