From: Mark Nauwelaerts Date: Fri, 18 Dec 2009 12:30:29 +0000 (+0100) Subject: baseparse: check for remaining data when draining in push mode X-Git-Tag: 1.19.3~509^2~7136^2~995 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7f46ed82a25a63e73ea8220fa3620a4e8a8f02e;p=platform%2Fupstream%2Fgstreamer.git baseparse: check for remaining data when draining in push mode --- 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 */