[Bug 664133] [0.11] adapter: automatically unmap on clearing

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat Jan 14 11:53:26 PST 2012


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

Mark Nauwelaerts <mnauw> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |0.11.x

--- Comment #4 from Mark Nauwelaerts <mnauw at users.sourceforge.net> 2012-01-14 19:53:23 UTC ---
IMO, adapter should handle these cases (the audiocodec class indicating a
definite need for this).  Having adapter _unmap and clean up when needed has
similar/exact semantics and dangers for "user-side" as in 0.10 (regarding a
_peek data pointer versus _flush etc).

Following commits should fix this then:

commit 12757e604a894533b8fcd80a128eee528a613851
Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Tue Nov 15 17:42:56 2011 +0000

    adapter: automatically unmap on clearing

    When _clear gets called between _map and _unmap, buffers
    will be unreffed. If the adapter was mapped, memory leaks
    may occur.
    While calling _clear between _map and _unmap does not seem
    like such a great idea, this is possible in the audio
    encoder base class, as _clear may be called in _finish_frame.
    Since the audio encoder relies on flushing to keep track of
    timestamps, delaying flushing till after handle_frame seems
    dangerous.
    So, we unmap on clear, as the next unmap will do nothing.
    This makes _clear safe to call between _map and _unmap,
    while avoiding leaking the mapped buffer.

    https://bugzilla.gnome.org/show_bug.cgi?id=664133

commit ea2f87d34e72a268d5607661ebc80703b2fc8d50
Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Wed Jan 11 10:59:53 2012 +0100

    adapter: ensure automagic _unmap in some more cases

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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