[Bug 727109] buffer: Should not set TAG_MEMORY if memory has not been replaced

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Apr 9 13:28:21 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=727109
  GStreamer | gstreamer (core) | git

--- Comment #6 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2014-04-09 20:28:17 UTC ---
Btw, the patch I've attached here break the unit test, just so everyone are
aware. A solution I see is:

default_reset() {
  if (!TAG_MEMORY)
    gst_buffer_resize (...)
  }
}

Combine with the change I already attached. This way, if the size changed in a
way that cannot be fixed, gst_buffer_resize() will set the TAG_MEMORY, and from
there we'll know that there was nothing we could do about it.

Pool holding planar images in multiple memory will definitely want to implement
their own resize() (per memory) if they have padding for each memory.

There is one thing I really don't like though, it's the side effect of copying
buffer before right before freeing them when NO_SHARE is present. This would
become a huge overhead. For this reason, it would be good to check that all
no-share enabled pool implement their own reset/resize routine to avoid this.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gstreamer-bugs mailing list