AVFormatContext.max_interleave_delta

Maximum buffering duration for interleaving.

To ensure all the streams are interleaved correctly, av_interleaved_write_frame() will wait until it has at least one packet for each stream before actually writing any packets to the output file. When some streams are "sparse" (i.e. there are large gaps between successive packets), this can result in excessive buffering.

This field specifies the maximum difference between the timestamps of the first and the last packet in the muxing queue, above which libavformat will output a packet regardless of whether it has queued a packet for all the streams.

Muxing only, set by the caller before avformat_write_header().

struct AVFormatContext
long max_interleave_delta;

Meta