From: Wim Taymans Date: Mon, 11 Apr 2011 08:20:10 +0000 (+0200) Subject: buffer: add FIXME X-Git-Tag: RELEASE-0.11.0~463 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df85690cfdac9fe15cccaf85b20373e0a81be714;p=platform%2Fupstream%2Fgstreamer.git buffer: add FIXME --- diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index 7fa1db9..40834be 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -198,7 +198,10 @@ _memory_add (GstBuffer * buffer, GstMemory * mem) guint len = GST_BUFFER_MEM_LEN (buffer); if (G_UNLIKELY (len >= GST_BUFFER_MEM_MAX)) { - /* to many buffer, span them */ + /* too many buffer, span them. */ + /* FIXME, there is room for improvement here: We could only try to merge + * 2 buffers to make some room. If we can't efficiently merge 2 buffers we + * could try to only merge the two smallest buffers to avoid memcpy, etc. */ _replace_memory (buffer, _span_memory (buffer, 0, -1, FALSE)); /* we now have 1 single spanned buffer */ len = 1;