mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
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:
parent
5a5ae1be1f
commit
9ea6af280d
1 changed files with 3 additions and 11 deletions
|
@ -3184,17 +3184,9 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
av = gst_adapter_available (parse->priv->adapter);
|
av = gst_adapter_available (parse->priv->adapter);
|
||||||
|
|
||||||
if (G_UNLIKELY (parse->priv->drain)) {
|
if (G_UNLIKELY (parse->priv->drain)) {
|
||||||
GST_DEBUG_OBJECT (parse, "draining, data left: %u, min %u", av, min_size);
|
min_size = av;
|
||||||
/* pass all available data to subclass, not just the minimum,
|
GST_DEBUG_OBJECT (parse, "draining, data left: %d", min_size);
|
||||||
* but never pass less than the minimum required to the subclass */
|
if (G_UNLIKELY (!min_size)) {
|
||||||
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);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue