Currently ff_interleave_packet_per_dts() waits until it gets a frame for each stream before outputting packets in interleaved order. Sparse streams (i.e. streams with much fewer packets than the other streams, like subtitles or audio with DTX) tend to add up latency and in specific cases end up allocating a large amount of memory. Emit the top packet from the packet_buffer if it has a time delta larger than a specified threshold. Original report of the issue and initial proposed solution by mus.svz@gmail.com.
Showing the changes to doc/APIchanges (1 of 5 files). Show all
Unified · Split
| @@ -13,6 +13,10 @@ libavutil: 2013-12-xx · 12 unmodified lines | ||
| 13 | 13 | |
| 14 | 14 | API changes, most recent first: |
| 15 | 15 | |
| 16 | +2014-02-xx - xxxxxxx - lavf 55.11.0 - avformat.h | |
| 17 | + Add AVFormatContext.max_interleave_delta for controlling amount of buffering | |
| 18 | + when interleaving. | |
| 19 | + | |
| 16 | 20 | 2014-01-xx - xxxxxxx - lavc 55.32.1 - avcodec.h |
| 17 | 21 | Edges are not required anymore on video buffers allocated by get_buffer2() |
| 18 | 22 | (i.e. as if the CODEC_FLAG_EMU_EDGE flag was always on). Deprecate |