[FFmpeg-trac] #2322(documentation:closed): Memory leak in muxing.c

FFmpeg trac at avcodec.org
Thu Mar 7 03:23:42 CET 2013


#2322: Memory leak in muxing.c
-------------------------------------+-------------------------------------
             Reporter:  burek        |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
              Version:  git-master   |  documentation
             Keywords:  leak         |               Resolution:  fixed
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by mytree):

 Hi.
 First, I appreciate your interest.
 Also, It must be understood that I am not class enough to write English
 well.

 I'm using ffmpeg library in windows platform,
 so I downloaded ffmpeg library from Zeranoe FFmpeg builds site.

 I wanted to how to encode files in ffmpeg,
 and I found FFmpeg example muxing.c file.

 Here is my test environment
         OS : Windows 7
         Platform : Visual Sutdio 2010
         FFmpeg version : 2013-03-02 git-4f0d4ac ( Zeranoe's FFmpeg Builds
 Home Page )

 I modified a muxing.c file to adapt itself to windows os.
 and I repeated the encoding process for a period of time.

 Test code are composed following structure.

 void main( void )
 {
         repeat for 30 seconds...
         {
                 encoding open.
                 data encoding.
                 encoding close.
         }
 }

 I used muxing.c example's functions for test.

 It works well and there was no memory leak.
 But I found that memory was increased gradually in windows task manager
    during repeating encoding process.

 In my opinion, this program will terminate some time,
    if encoding process is repeated for long time.

 I wonder why this is happenning.
 Is there any way to solve this problem?

 I attached the source and project to this issue.

 The project zip file is left off ffmpeg library files.

 folder directory structure is

    Bin                                          : .exe .dll files ( ffmpeg
 library )
    Build                                        : vc solution files
    ffmpeg                                       : ffmpeg source
    MuxingMemoryLeakCheck        : vc project files
    Obj                                          : object files

 In Zeranoe's FFmpeg Builds Home Page, you will get the ffmpeg libarary
 files.
 ( swscale-x.dll, avutil-xx.dll, avcodec-xx.dll, avformat-xx.dll, etc... )

 Add these files to Bin directory, and open the .sln file in visual studio.
 you will compile the source.

 Any advice will go far toward solving the problem.

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


More information about the FFmpeg-trac mailing list