ftp: fix using uninitialized value

Fix coverity issue CID 1026777

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ffserver: fix null pointer dereference

Fixes CID732208
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'lukaszmluki/master'

* lukaszmluki/master:
  ftp: fix using uninitialized value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mem: Add av_realloc_array and av_reallocp_array

These help avoiding overflows and simplify error handling.

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Keep track of the allocated size for the cluster array

When writing fragmented mp4, the cluster array is reset when a
fragment is written. Instead of starting off reallocating the
array only based on the number of current elements in it, keep
track of how many elements there were allocated earlier.

This avoids reallocating this array needlessly when writing
fragmented mp4 files.

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Increase the cluster array allocation by doubling

The previous allocation increment of 16384 meant that the cluster
array was allocated for 0.6 MB initially, which is a bit excessive
for cases with fragmentation where only a fraction of that ever
actually is used.

Therefore, start off at a much smaller value, and increase by
doubling (to avoid reallocating too often when writing long
non-fragmented mp4 files).

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Grow the frag_info array in chunks

Previously it was grown one element at a time, which leads to
excessive reallocations.

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
network: uniform ff_listen_bind and ff_listen_connect

Document the functions and have both use a millisecond timeout and
check for interrupt.
wresample/rematrix_template: fix internal types

Should make no difference, but future commits will need it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swresample/rematrix: add S32 mixing code

Needed for dithering S32

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavfi doxy: improve/extend AVFilter doxy.
avconv: check that the output format context exists before accessing it

Fixes a segfault in exit_program() if opening an output file fails.
apetag: use int64_t for filesize

CC: libav-stable@libav.org
tak: simplify ff_tak_check_crc()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Use av_log() instead of fprintf() in ffplay.

Fixes ticket #2630.

Reviewed-by: Marton Balint
pngdec: dont treat mpng like png with key and non keyframes

Fixes Ticket2618

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/general: update after e4e4add0e3ba7

Signed-off-by: Paul B Mahol <onemda@gmail.com>
swr: add native_simd_one

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: Fix dithering of s16 with SIMD

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swresample: set flags & description and add documentation for output_sample_bits

Allows users to actually use such option.

Signed-off-by: Paul B Mahol <onemda@gmail.com>