On Tue, 4 Feb 2014, Anton Khirnov wrote:
From: Luca Barbato <[email protected]>
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
[email protected].
Bug-id: 31
Signed-off-by: Anton Khirnov <[email protected]>
---
doc/APIchanges | 4 ++++
libavformat/avformat.h | 18 ++++++++++++++++++
libavformat/mux.c | 35 +++++++++++++++++++++++++++++++++--
libavformat/options_table.h | 1 +
libavformat/version.h | 4 ++--
5 files changed, 58 insertions(+), 4 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index e4bd6d8..a64962b 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,10 @@ libavutil: 2013-12-xx
API changes, most recent first:
+2014-02-xx - xxxxxxx - lavf 55.11.0 - avformat.h
+ Add AVFormatContext.sparse_stream_threshold for controlling the detection of
+ sparse streams.
+
I'm not completely convinced about the name - it doesn't say anything
about what it actually is about (interleaving) and introduces a concept
you haven't necessarily even thought about before (stream sparseness). I
kinda prefer the one I suggested earlier (max_interleave_difference or
so), but I don't have a very strong opinion about it.
The rest of the patch looks good.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel