[Libav-user] get_buffer vs get_buffer2, how do I manage/release buffers?
antoine at nagafix.co.uk
Tue Nov 12 09:15:18 CET 2013
Our app uses ffmpeg1.2's "get_buffer" API to manage the lifecycle of the
video buffers (decoding vpx and x264):
* it overrides "get_buffer" and "release_buffer"
* it calls "avcodec_get_buffer" and does its own reference counting
* it only calls "avcodec_release_buffer" when it is safe to do so (when
both ffmpeg and our code have finished using the buffer)
I've looked at porting to ffmpeg2's "get_buffer2" API but I do not
understand how we can achieve the same results.
How/when do the frames get released? (since "avcodec_release_buffer" is
It seems that "refcounted_frames" and "av_frame_unref" have something to
do with it, but how?
PS: apologies for wrongly sending this post to ffmpeg-users previously.
More information about the Libav-user