avconv: mark attachment streams as immediately finished

There are never any packets for those streams.
Fixes an infinite loop with -attach.
mpegts: add support for stream_type 0x42, which is CAVS

This allows demuxing and muxing of CAVS TS streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
ape: make version-dependent decoding functions called via pointers

This will help in supporting old versions, e.g. version 3.93 uses the same
range coder but different predictor and version 3.82 uses different range
coder and predictor. Also this should not make decoding newer versions slower
by introducing additional checks on versions.
ape: provide two additional bytes in buffer for old MAC versions

Range coder in 3.90-3.95 overread two bytes in the final normalize.
add support for Monkey's Audio versions from 3.93
atrac3: avoid oversized shifting in decode_bytes()

When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.

    (0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))

Avoid oversized shifting.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
flacdec: simplify bounds checking in flac_probe()

Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
lzo: fix overflow checking in copy_backptr()

The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.

Remove the check.  Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
lavf: sanity check size in av_get/append_packet().

To avoid allocating ridiculous amounts of memory for corrupted files,
read the input in chunks limited to filesize or an arbitrary large
amount when that is not known (chosen to be 50M).
lavfi: use designated initializers in avfilter_class
avfiltergraph: replace AVFilterGraph.filter_count with nb_filters

This is more consistent with the naming in the rest of Libav.
avfiltergraph: use sizeof(var) instead of sizeof(type)
filters.texi: restore mistakenly removed section name for noformat
AVOption: remove an unused function parameter.
AVOptions: fix using named constants with child contexts.

The named constant needs to be searched for in the same object on which
the option is set, i.e. target_obj.
vf_showinfo: remove its useless init function

Filter private data is memset to 0 so there is no point in explicitly
initing anything to 0.
asrc_anullsrc: do not set samplerate and channel layout explicitly

They are auto-negotiated.
asrc_anullsrc: return EOF, not -1
af_join: do not leak input frames.
document the release process