[FFmpeg-user] get_buffer vs get_buffer2, how do I manage/release buffers?

Antoine Martin antoine at nagafix.co.uk
Mon Nov 11 07:30:54 CET 2013


Hi,

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
no more)
It seems that "refcounted_frames" and "av_frame_unref" have something to
do with it, but how?

Thanks
Antoine


More information about the ffmpeg-user mailing list