[Ffmpeg-devel] Re: Memory leak in output_example ... ?
Fri Sep 23 15:49:23 CEST 2005
> > Another thing: I used only a few codecs and I think the same problems
> > accour with different codecs...
> Could well be... but every memory leak that is squashed is good.
I found, that there is another leak in the alaw/ulaw encoders:
In pcm.c, function pcm_encode_init():
linear_to_alaw = av_malloc(16384); -> linear_to_alaw = av_mallocz_static(16384);
linear_to_ulaw = av_malloc(16384); -> linear_to_alaw = av_mallocz_static(16384);
I don't use the alaw/ulaw codecs (have my own implementations), so I cannot
make/test a patch.
Another question is, if there should be a function av_malloc_static().
av_mallocz_static initializes the memory with 0 (like calloc), but in this
case this isn't necessary since the whole table gets initialized anyway.
More information about the ffmpeg-devel