From 9ea6af280d492a26749c2feafad75d435512eef8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 2 Nov 2016 09:35:05 +0200 Subject: [PATCH] Revert "baseparse: fix draining with less data than min frame size available" This reverts commit 2e278aeb7128e8732f5324ab8c8b22a47950c80a. 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 --- libs/gst/base/gstbaseparse.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 168b81b..816b7ab 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -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; } } -- 2.7.4