[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
https://blogs.gentoo.org/lu_zero/2016/03/21/bitstream-filtering/
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
malformed".

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
output?

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

    if (result < 0)
        return result;

    av_packet_free(&in);
    return AVERROR(EAGAIN);

But it interrupts processing.


More information about the ffmpeg-devel mailing list