AVIFileGetFrame memory leak

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a server that generates AVI files (as a step to creating H263) on
demand. I use the AVI Stream functions provided with Visual Studio in C++.
It
leaks 16 bytes of memory each time an AVI video is created according to
Purify. I have run various versions of the code (the VS 6.0 example, our
full
applications, simplified versions...), and they all leak the same amount of
memory. I've checked initialization, release stuff etc. etc. with no luck in
removeing the leak.

I've tried reading both wav and avi files as input, and get the same leak.

The simplest version of this program is found at:

http://www.facems.com/else/SimpleLeak.html

I've also tested VS .Net 2003 with the same results. The examples here also
leak memory.

Report from purify runs at: http://www.facems.com/else/PurifyReport.txt

I really need to get rid of the memory leak to get a stable server, so all
help is greatly appreciated.

More details:

The audio format I use is uncompressed wav as input (PCM). I have followed
the
example aviview in doing the following:

Open the wav-file as an AVI file using AVIFileOpen, then create an avi
stream from this file using AVIFileGetStream.

Next, initialize an AVISTREAMINFO. Here it reads data from the above
mentioned input avi stream and fills in the AVISTREAMINFO. This is done in
function InitStreams() that you find on the specified html file from my
first
post.

This is similar to how the AVISTREAMINFO is set for the animation part (not
included in the above html file), and, as mentioned, the animation part does
not leak memory (and is not compressed either).

Then AVISaveV is called with the AVISTREAMINFO as parameter, followed by
AVISaveOptionsFree and AVIStreamClose and AVIFileClose.

There is no memory leak when following the same steps, but only creating
animation.




.



Relevant Pages

  • AVIStreamGetFrame memory leak
    ... I use the AVI Stream functions provided with Visual Studio in C++. ... leaks 16 bytes of memory each time an AVI video is created according to ... removeing the leak. ... I really need to get rid of the memory leak to get a stable server, ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: AVIStreamGetFrame memory leak
    ... >> leaks 16 bytes of memory each time an AVI video is created according to ... >> removeing the leak. ... > Funny thing is when I was testing large AVI files and using AVIStreamGetFrame ... > There gotta be something wrong with those interfaces. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: AVIStreamGetFrame memory leak
    ... > leaks 16 bytes of memory each time an AVI video is created according to ... > removeing the leak. ... Funny thing is when I was testing large AVI files and using AVIStreamGetFrame ... BTW are there any different alternatives to AVIFile and AVIStream functons?? ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: Xvid casing the problems
    ... Actually the footage I tried to drag to ... the timeline today was in avi format and it crashed once again. ... I hear you but .avi files are known to cause problems ... Info about CCCP (Combined Community Codec Pack) ...
    (microsoft.public.windowsxp.moviemaker)
  • Re: error when play avi. file
    ... I'm encountering the exact ... I usually can watch the first half of the .avi, ... See http://zachd.com/pss/pss.html for some helpful WMP info. ... Just some particular AVI files or all AVI files? ...
    (microsoft.public.windowsmedia.player)