[Libav-user] Cleaning AVFrame properly

Philippe Gorley philippe.gorley at savoirfairelinux.com
Mon Apr 1 16:32:56 EEST 2019


On 2019-04-01 4:48 a.m., Venkateswaran.S wrote:
> Apologise for the typos.
> I'm creating AVFrame object using av_frame_alloc() function and clearing 
> it using av_frame_free(&frame) which internally calls av_frame_unref(), 
> but it's not cleaning the memory properly. Heap size of my app grows 
> exponentially in run time.

What version of the libav* libraries are you using? Have you tried 
running valgrind on your application? I've never had this issue with 
av_frame_free.

> 
> As far as I know, av_frame_free() calls av_freep() which calls av_free() 
> to free the dynamic memory. Memory gets cleaned, If I use 
> av_free(frame->data[0]) directly instead of av_frame_free(&frame)
> 
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
> 
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
> 

Cheers,

-- 
Philippe Gorley
Free Software Consultant | Montréal, Qc
Savoir-faire Linux


More information about the Libav-user mailing list