avformat/pcm: decrease delay when reading PCM streams.
authorPhilipp M. Scholl <pscholl@bawue.de>
Sat, 10 Mar 2018 14:50:06 +0000 (15:50 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 13 Mar 2018 00:34:42 +0000 (01:34 +0100)
commit040b28aeccce8bc3c2e109f8e0ea7f0ed4d3af08
tree2f1ff70fb75f3f9f671e04fe04291048274d7051
parentaf7e953a595690caf4127957f42d639641035411
avformat/pcm: decrease delay when reading PCM streams.

  Thanks for the discussion. Here's the next version, now with /25 and removed
ff_log2().

  The blocksize of the PCM decoder is hard-coded. This creates
unnecessary delay when reading low-rate (<100Hz) streams. This creates
issues when multiplexing multiple streams, since other inputs are only
opened/read after a low-rate input block was completely read.

 This patch decreases the blocksize for low-rate inputs, so
approximately a block is read every 40ms. This decreases the startup
delay when multiplexing inputs with different rates.

Signed-off-by: Philipp M. Scholl <pscholl@bawue.de>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/pcm.c
tests/ref/seek/lavf-alaw
tests/ref/seek/lavf-mulaw