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>
wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
wmalosslessdec: increase channel_coeffs/residues size

Fixes CVE-2012-2792

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Merge commit 'b146d74730ab9ec5abede9066f770ad851e45fbc'

* commit 'b146d74730ab9ec5abede9066f770ad851e45fbc':
  indeo4: update AVCodecContext width/height on size change
  dfa: check that the caller set width/height properly.
  indeo5dec: Make sure we have had a valid gop header.
  cavsdec: check for changing w/h.
  lavc: set channel count from channel layout in avcodec_open2().
  doc/platform: Rework the Visual Studio linking section
  doc/faq: Change the Visual Studio entry to reflect current status
  doc/platform: Replace Visual Studio section with build instructions
  doc/platform: Nuke section on linking static MinGW-built libs with MSVC
  doc/platform: Remove false claim about MinGW installer
  doc/platform: Mention MinGW-w64
  dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
  mpegaudiodec: fix short_start calculation

Conflicts:
	doc/faq.texi
	doc/platform.texi
	libavcodec/cavsdec.c
	libavcodec/indeo5.c
	libavcodec/ivi_common.h

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