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

FFmpeg trac at avcodec.org
Mon Jan 30 22:45:28 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 beafdefx):

 OK, I'm looking at the documentation for swr_convert:

 http://www.ffmpeg.org/doxygen/trunk/swresample_8c.html#81af226d8969df314222218c56396f6a

 Parameters:
         s:      allocated Swr context, with parameters set
         out:    output buffers, only the first one need be set in case of
 packed audio
         out_count:      amount of space available for output in samples
 per channel
         in:     input buffers, only the first one need to be set in case
 of packed audio
         in_count:       number of input samples available in one channel

 The counts are documented as "samples per channel".  If the counts are
 supposed to be buffer sizes, then the documentation is incorrect or I am
 misunderstanding the documentation.  If the values are supposed to be
 measured in samples per channel, then I would assume passing 16000 for
 both values is correct since I have allocated exactly room for 16000
 samples in both the input buffer and the output buffer, each according to
 their requested sampling rate.

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


More information about the FFmpeg-trac mailing list