[FFmpeg-devel] Can BSF delay packets?

Ronald S. Bultje rsbultje at gmail.com
Mon Feb 6 16:06:37 EET 2017

Hi Aleksey,

On Mon, Feb 6, 2017 at 8:45 AM, Aleksey M <hex000 at gmail.com> wrote:

> Hi Ronald.
> Thank you for replying!
> If I return 0 -- how the calling function determines that I've produced an
> output packet?
> What do I do to signal caller that I don't want to produce an output
> packet?

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
as an example.

The EAGAIN is handled here:
and the unref will zero the packet, which invokes this code:
and then it will skip the packet and wait for the next.

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... (?)


More information about the ffmpeg-devel mailing list