From a7f46ed82a25a63e73ea8220fa3620a4e8a8f02e Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 18 Dec 2009 13:30:29 +0100 Subject: [PATCH] baseparse: check for remaining data when draining in push mode --- gst/audioparsers/gstbaseparse.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/audioparsers/gstbaseparse.c b/gst/audioparsers/gstbaseparse.c index bfbb73dab1..dfe53d5488 100644 --- a/gst/audioparsers/gstbaseparse.c +++ b/gst/audioparsers/gstbaseparse.c @@ -1103,6 +1103,11 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer) if (G_UNLIKELY (parse->priv->drain)) { min_size = gst_adapter_available (parse->adapter); + GST_DEBUG_OBJECT (parse, "draining, data left: %d", min_size); + if (G_UNLIKELY (!min_size)) { + gst_buffer_unref (tmpbuf); + goto done; + } } /* Collect at least min_frame_size bytes */ -- 2.34.1