I am having the same problem where I can not free my buffer after I allocate my custom AVIOContext. Did anyone find a solution to this? Any help would be very thankful. , Diego