[haiku-bugs] Re: [Haiku] #14047: Continuous music playback causes dramatic RAM usage

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Fri, 20 Dec 2019 21:15:36 -0000

#14047: Continuous music playback causes dramatic RAM usage
------------------------------+----------------------------
   Reporter:  dsuden          |      Owner:  leavengood
       Type:  bug             |     Status:  assigned
   Priority:  normal          |  Milestone:  Unscheduled
  Component:  Kits/Media Kit  |    Version:  R1/Development
 Resolution:                  |   Keywords:
 Blocked By:                  |   Blocking:
Has a Patch:  0               |   Platform:  All
------------------------------+----------------------------
Comment (by mmlr):

 The problem was the buffer of the IO context. It needs to be freed
 manually, but this wasn't done in the error path of `avformat_open_input`.
 Since it also resets the `fIOContext` to NULL, the destructor would then
 also not free it. This should be fixed in hrev53640.

 The resulting leak here would be very variable in size, since
 `avformat_open_input` may reallocate the buffer to make it larger. In my
 testing, it easily consumed multiple megabytes depending on what input you
 fed. So even though the initial allocation is relatively small at 32K, the
 eventual leak could be orders of magnitude larger.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14047#comment:13>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: