Thibault Collet <[EMAIL PROTECTED]> writes: > Does anybody knows why when I call "av_free_packet" with a packet (after > processing it), it doesn't really free my memory space ?
There is an attempt to implement a kind of 'smart pointers'. FFmpeg buffers the data i order to calculates time stamps for each frame. > I tried also through the direct way : free(packet->data), and it does not > work either. I suspected some kind of protections from ffmpeg, but then why > av_free_packet is facing the same issue ? Nothig more beyond the standard C. If you explore the library deeply, you'll find that packet has a pointer to the destruction function, and av_free_packet calls it. There are two such functions: av_destruct_packet and av_destruct_packet_nofree. The latter is pointed to by default, and it simply zeroes the pointer and the data size. However, I've discovered a bug, sometimes packets stick in the input buffer and are not deleted from there. http://article.gmane.org/gmane.comp.video.ffmpeg.libav.user/580 Unfortunately, I still didn't explore more details. Another answer to you, about the memory usage, is also important. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
