[FFmpeg-devel] Can BSF delay packets?
Ronald S. Bultje
rsbultje at gmail.com
Mon Feb 6 16:47:49 EET 2017
Hi,
On Mon, Feb 6, 2017 at 9:33 AM, wm4 <nfxjfg at googlemail.com> wrote:
> On Mon, 6 Feb 2017 09:06:37 -0500
> "Ronald S. Bultje" <rsbultje at gmail.com> wrote:
>
> > Please don't top-post.
> >
> > I have to admit the new BSF API is super-confusing. I think you return
> > EAGAIN but you also have to deallocate the "out" AVPacket. See
> > http://git.videolan.org/?p=ffmpeg.git;a=blob;f=
> libavcodec/vp9_superframe_bsf.c;h=b686adbe1673f564d252a30cff11c5
> 895a9a3b55;hb=HEAD
> > as an example.
> >
> > The EAGAIN is handled here:
> > http://git.videolan.org/?p=ffmpeg.git;a=blob;f=
> libavcodec/bitstream_filter.c;h=02878e3bf3e9771f5921ce218771f0
> 41e19f2d59;hb=HEAD#l144
> > and the unref will zero the packet, which invokes this code:
> > http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/utils.c;h=
> 07113107920a910d3b3094f01a1b3f8a58b11072;hb=HEAD#l5256
> > and then it will skip the packet and wait for the next.
>
> Internal and external APIs are rather different, I guess.
>
> > I'm not sure how to retrieve delayed packets though, it seems that's
> simply
> > not possible ATM, not in FFmpeg but also not in Libav - at least using
> the
> > av_bitstream_filter_filter() function... (?)
>
> That function is deprecated, and probably can't do everything the
> new "proper" API can (the send/receive ones).
That doesn't matter as long as it's there and used by libavformat/utils.c
when calling av_read_frame().
Ronald
More information about the ffmpeg-devel
mailing list