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

This reverts commit 2e278aeb71.

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
This commit is contained in:
Sebastian Dröge 2016-11-02 09:35:05 +02:00
parent 5a5ae1be1f
commit 9ea6af280d

View file

@ -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;
}
}