Hi, I hope this is the right mailing list to post this question to, please accept my apologies if it is not, and advise where I should post it instead.
Our application is linking to the av*.lib libraries, and using the av*.dll's. I wish to be able to track the memory usage of these FFMPEG libraries, for example by replacing av_malloc and av_free. mem.c suggests this should be possible: /* You can redefine av_malloc and av_free in your project to use your memory allocator. You do not need to suppress this file because the linker will do it automatically. */ This seems not to be accurate. make will build and link the DLLs with the default definition of those functions, whereas building and linking our project is a separate, secondary step. So defining av_malloc and av_free in our project replaces only those calls to av_malloc and av_free in our project. The FFMPEG DLLs continue to malloc and free their own memory, out of sight and out of the control of our project. Short of hacking apart the FFMPEG code itself, there seems no way to take further control over memory. Has anyone successfully done this? Is there any documentation that better explains how to do it? Or is there something else I am missing? It surprises me somewhat that the capability is not offered for the user to provide their own memory allocation callback function, as that is something I have come to expect in libraries with a similar level of functionality. Was this ever considered? Many thanks Andy Patrick This communication may contain information that is sensitive. It is intended for the exclusive use of the intended recipients. If you have received this email by an error or are not the intended recipient, then please note that any distribution, disclosure, copying or use is prohibited. Please notify us by either email or by telephone and then delete the email and copies of it. The opinions expressed in this communication are those of the sender and are not necessarily supported by OmniBus Systems Limited. OmniBus Systems Limited: Registered in England & Wales No. 2738586, VAT No. GB 591 7967 79. Registered Office: Stanford House, Stanford-on-Soar, Loughborough, Leicestershire LE12 5PY. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
