Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques av_malloc – mem leak

  • av_malloc – mem leak

    Posted by Reichel Bart on July 18, 2011 at 11:17 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

    Reichel Bart replied 15 years, 1 month ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy