[Libav-user] Replacement for release_buffer
nfxjfg at googlemail.com
Thu Mar 27 23:04:06 CET 2014
On Thu, 27 Mar 2014 22:37:35 +0100
Info || Non-Lethal Applications <info at non-lethal-applications.com>
> I’m fairly new to ffmpeg. Thus, I worked through the excellent tutorials of Stephen Dranger.
> In his tutorial number 5, he presents a method to get the correct pts of a given frame.
> This involves setting a custom get_buffer and release_buffer function to the AVCodecContext.
> As both of these are now deprecated, I used get_buffer2 but I couldn’t get a replacement for release_buffer.
> Could anyone point me in the right direction?
You don't need get_buffer/release_buffer to get the PTS. The tutorial
is probably hopelessly outdated (as the FFmpeg API moves fast), and
will do more damage than it helps in any way.
If you really want to use get_buffer2 (which you probably don't), then
read the comment surrounding it: you need to setup an AVBuffer
reference, which is released when the frame is released.
If you just want the PTS, look at AVFrame.pkt_pts and pkt_dts.
More information about the Libav-user