From: <mn...@ke...> - 2009-12-18 12:45:03
|
Module: gst-plugins-bad Branch: master Commit: a61183fe291ba46a5e5ea7c37dee10b3a7fdf87e URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=a61183fe291ba46a5e5ea7c37dee10b3a7fdf87e Author: Mark Nauwelaerts <mar...@co...> Date: Fri Dec 18 13:30:29 2009 +0100 baseparse: check for remaining data when draining in push mode --- gst/audioparsers/gstbaseparse.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/gst/audioparsers/gstbaseparse.c b/gst/audioparsers/gstbaseparse.c index bfbb73d..dfe53d5 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 */ |