[FFmpeg-devel] Can BSF delay packets?

Aleksey M hex000 at gmail.com
Mon Feb 6 12:18:40 EET 2017

Hi dear FFMPEG contributors,

Does the bitstream filter (BSF) interface allow to delay packets?

>From Luca's description
it looks like it can produce any number of output packets or consume any
number of input packets.

But any attempt to return AVERROR(EAGAIN) results in FFMPEG interrupting
processing saying 'Timestamps are unset in a packet...H.264 bitstream

Could anyone point me in the right direction? Or give a working example of
just delaying by a single packet?

For example, should this filter consume all input packets without producing

    AVPacket* in = NULL;
    int result = ff_bsf_get_packet(ctx, &in);

    if (result < 0)
        return result;

    return AVERROR(EAGAIN);

But it interrupts processing.

More information about the ffmpeg-devel mailing list