[Bug 750039] Keeping buffers with shared memory alive
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu May 28 08:22:33 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=750039
--- Comment #4 from Jan Schmidt <thaytan at noraisin.net> ---
(In reply to Nicolas Dufresne (stormer) from comment #2)
> (In reply to Jan Schmidt from comment #0)
> > We had a problem recently with sharing GstMemory to another buffer. The
> > memory gains an extra ref and stays alive fine, but the original parent can
> > still be unreffed and returned to a bufferpool (and hence reused) while the
> > child buffer is still using it.
>
> This is because your pool is only checking "gst_buffer_is_writable()". It
> should check for gst_buffer_is_all_memory_writable() writable and discard.
> That definitely need fixing in that pool implementation. Is it a known one ?
> Maybe we could add this to the base class ?
Hmmm. Interesting point. The default pool implementation checks
gst_buffer_is_all_memory_writable() and discards. I'll retrace my steps and see
where this was going wrong for us.
> Though, I agree a mechanism that would make this more pool friendly would be
> nice. Right now, a gst_buffer_copy() or any reuse of a memory coming from
> another buffer, will cause the original buffer to be discarded and
> reallocated. All this may have the side effect to keep few possibly "unused"
> memory alive for longer then needed (specially in the case where the buffer
> has no pool). I would make use of this mechanism conditional to buffer from
> pool.
A good idea - there's no need to keep non-pool parent buffers alive.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list