baseparse: remove the memory from the tmpbuf
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 17 Oct 2011 15:00:04 +0000 (17:00 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 17 Oct 2011 15:04:10 +0000 (17:04 +0200)
We use a tmpbuf to hold a temporary pointer to the adapter memory. We need to
remove that memory when we no longer need it.

libs/gst/base/gstbaseparse.c

index df247ec..90407ea 100644 (file)
@@ -2293,6 +2293,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
       res = bclass->check_valid_frame (parse, frame, &fsize, &skip);
       gst_adapter_unmap (parse->priv->adapter, 0);
       gst_buffer_replace (&frame->buffer, NULL);
+      gst_buffer_remove_memory_range (tmpbuf, 0, -1);
       if (res) {
         if (gst_adapter_available (parse->priv->adapter) < fsize) {
           GST_DEBUG_OBJECT (parse, "found valid frame but not enough data"