mpegaudiodec: fix short_start calculation

The value should be always 3, as it follows from the specification.

Fix a stack buffer overflow in exponents_from_scale_factors as reported
by asan. Thanks to Dale Curtis for the sample vector.
dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()

This should fix the utvideoenc valgrind failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/platform: Mention MinGW-w64

This is the toolchain most, including Libav's nightlies, use to build.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
doc/platform: Remove false claim about MinGW installer

This works just fine, and has for quite a while, using the mingw-get
installer.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
doc/platform: Nuke section on linking static MinGW-built libs with MSVC

This practice is not supported by the MinGW developers, and even requires
patching the MinGW runtimes in newer versions. Furthermore, we now support
build with MSVC, so this section is rendered useless.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
doc/platform: Replace Visual Studio section with build instructions

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
doc/faq: Change the Visual Studio entry to reflect current status

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
doc/platform: Rework the Visual Studio linking section

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
lavc: set channel count from channel layout in avcodec_open2().

Some decoders (e.g. nellymoser) only set channel_layout and do not set
channel count.
cavsdec: check for changing w/h.

Our decoder does not support changing w/h.

Fixes CVE-2012-2777 and CVE-2012-2784.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
indeo5dec: Make sure we have had a valid gop header.

This prevents decoding happening on a half initialized context.

Fixes CVE-2012-2779

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
dfa: check that the caller set width/height properly.

Fixes CVE-2012-2786.
indeo4: update AVCodecContext width/height on size change

Fixes CVE-2012-2787

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
avidec: return 0, not packet size from read_packet().
avidec: use actually read size instead of requested size

Fixes CVE-2012-2788
wmaprodec: check num_vec_coeffs for validity

Fixes CVE-2012-2789

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
lagarith: check count before writing zeros.

Fixes CVE-2012-2793

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
ffprobe: add support to library ident printing
ffprobe: drop SECTION_ENTRY macro

The use of the macro makes to add new optional fields somewhat harder.
ffprobe: generalize nesting model for the default writer

Regular section fields nested in a regular section are now prefixed by
the nested section name.

This is required by the pending change related to disposition.