FORUMS: list search recent posts

av_malloc - mem leak

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
reichel bart
av_malloc - mem leak
on Jul 18, 2011 at 11:17:02 am

Hi,

I try to debug part of code from sample an I do not know why I have strange memory leak. In one function I have

buffer = (uint8_t *)av_malloc(numBytes * sizeof(uint8_t));
av_freep(buffer);

this works great I do not have any mem leak. But when I put one line

buffer = (uint8_t *)av_malloc(numBytes * sizeof(uint8_t));
memset(buffer, 0, numBytes * sizeof(uint8_t));
av_freep(buffer);

memory leaks very fast ... (same if I put av_mallocz) and of course with avpicture_fill and sws_scale

Could you help me ? Is this functions depend on something other (memset destroy mem align ?!) ? I do not see special av_ function for doing this.

thank you
reichel

I work on windows 7 with Qt and ffmpeg lib version avcodec-52.dll, avutil-50.dll


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]