[FFmpeg-trac] #942(swresample:closed): swresample leaks memory when sampling up

FFmpeg trac at avcodec.org
Mon Jan 30 23:38:02 CET 2012


#942: swresample leaks memory when sampling up
------------------------------------+--------------------------------------
             Reporter:  beafdefx    |                    Owner:  michael
                 Type:  defect      |                   Status:  closed
             Priority:  normal      |                Component:  swresample
              Version:  git-master  |               Resolution:  invalid
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+--------------------------------------

Comment (by reimar):

 I am not sure what kind of solution you are thinking of exactly, and I
 haven't tested ant of these.
 Most of the time, just making the buffer a bit larger so it can take a few
 extra samples when necessary should work I guess.
 An alternative if that's no good is to call the resample function with 0
 size input buffer.
 If you absolutely always want to have a completely filled fixed-size
 output buffer you'd probably have to keep track of the rounding error and
 do the 0-size input buffer exactly at the right point.
 However that is complex and very brittle code.
 Another option would be to add a function to libswresample that will
 return the number of buffered samples.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/942#comment:14>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list