[Ffmpeg-devel] Re: Memory leak in output_example ... ?

Burkhard Plaum plaum
Thu Sep 22 17:53:07 CEST 2005


Hi,

> All memory leaks are gone :)

Didn't check if you got it right, but the rules are the following: 

All global pointers (which are shared among several codec instances) MUST be
allocated with *_static(). If they aren't, valgrind will report them as "still
reachable", and they MIGHT cause leaks.

Pointers, which are inside some context structure MUST NOT be allocated 
with *_static(). Instead, they must be freed right before the parent struct 
is freed.

Burkhard







More information about the ffmpeg-devel mailing list