swscale: K&R formatting cosmetics (part III)
mpegts: Try seeking back even for nonseekable protocols

The mpegts demuxer reads 5 KB at startup just for discovering
the packet size. Since the default avio buffer size is 32 KB,
the seek back to the start will in most cases be within the
avio buffer, and will in most cases succeed even if the actual
protocol isn't seekable.

This makes the demuxer startup faster/with less data when
reading data from a non-seekable input, by not skipping
the first few KB.

If it fails, don't warn if the protocol isn't seekable, making
it behave as before in the failure case.

Signed-off-by: Martin Storsjö <martin@martin.st>
avconv: fix off by one check in complex_filter

nb_input_files is already an invalid index.
matroska: Add incremental parsing of clusters.

Reduces the amount of upfront data required for cluster parsing
thus decreasing latency on seek and startup.

The change in the seek-lavf_mkv FATE test is due to incremental
parsing no longer reading as much data as the old parser and
thus not having that additional data to generate index entries
based on keyframes.  Index entries are added correctly as the
file is parsed.

All FATE tests pass and Chrome has been using this patch for ~6
months without issue.

Currently incremental parsing is not supported for files with
SSA tracks since they require merging packets between clusters.
In this case the code falls back to non-incremental parsing.

Signed-off-by: Aaron Colwell <acolwell@chromium.org>
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Remove libdirac decoder.

libschroedinger is the preferred way to decode Dirac video.
audemux: Add a sanity check for the number of channels

Fixes a division by 0.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
avutil: change default buffer size alignment for sample buffer functions

Aligning nb_samples will give both correct plane pointer alignment and enough
padding for SIMD-optimized functions.
matroska: Clear prev_pkt between seeks.

The new incremental parser doesn't always clear prev_pkt,
however the packet queue is cleared when seeking. Which leads
to a use-after-free.

Verified using Valgrind.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Simplify asynth sample generation.

One rule can be used to generate all asynth files.
Requires renaming the mapchan files though.
Also switch to using the .wav variants for mapchan
while changing the name anyway, this allows getting rid
of the explicitly specified format.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
indeo4: check quant_mat more fully.

quant_mats valid range depends on the block size.
This fixes a global array overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Get rid of tests/data/asynth-%.sw rule.

This also avoids an issue with parallel make in some
cases never building asynth-16000-1.sw.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
avfiltergraph: free the sink_links heap.
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  matroska: Clear prev_pkt between seeks.
  avutil: change default buffer size alignment for sample buffer functions
  audemux: Add a sanity check for the number of channels
  Remove libdirac decoder.
  matroska: Add incremental parsing of clusters.
  avconv: fix off by one check in complex_filter
  mpegts: Try seeking back even for nonseekable protocols
  swscale: K&R formatting cosmetics (part III)

Conflicts:
	configure
	doc/general.texi
	doc/platform.texi
	ffmpeg.c
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/libdirac.h
	libavcodec/libdiracdec.c
	libavformat/au.c
	libavformat/mpegts.c
	libswscale/input.c
	tests/ref/seek/lavf_mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mpc8: make maxband check less picky.

Fixes Ticket1245

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mpc8: print error messages on maxband(s) errors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>