OSDN Git Service

lavf: improve handling of sparse streams when muxing
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 20 Jan 2014 12:28:37 +0000 (13:28 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 4 Feb 2014 21:01:42 +0000 (22:01 +0100)
commitd9ae1031f5edbd25c8526b4cb51aba66d3bee931
tree8bf19706029f996334e900cb10e47ec97c1d1db7
parent4c3e1956ee35fdcc5ffdb28782050164b4623c0b
lavf: improve handling of sparse streams when muxing

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.

Bug-id: 31
Signed-off-by: Anton Khirnov <anton@khirnov.net>
doc/APIchanges
libavformat/avformat.h
libavformat/mux.c
libavformat/options_table.h
libavformat/version.h