configure: fix dependencies of XvMC and old vdpau mpeg2 decoders
vdpau: fix obsolete mpeg1 vdpau decoder when mpeg2 is disabled
vdpau: wrap codec specific functions in appropiate #ifs

Fixes linking when only a subset of the deprecated vdpau decoders is
enabled.
dca: Move ff_dca_convert_bitstream() to the DCA common code

This makes the DCA parser and decoder independent.
cosmetics: Remove unnecessary extern keywords from function declarations
mpeg12: Move some ff_mpeg1_* function declarations to a more suitable place
Split MPEG-1/2 decoder code off from MPEG-1/2 common code
mpeg12: Move Mpeg1Context declaration to the only place it is used
msmpeg4: Split decoding related functions to a separate file

This fixes standalone compilation of the msmpeg4v2, msmpeg4v3
and wmv2 encoders, that previously failed to link due to the
decoder codepaths requiring error_resilience.

Signed-off-by: Martin Storsjö <martin@martin.st>
build: Move setting of SRC_DIR to the only place it is used
build: Remove configure-generated .config file on distclean
ape: use correct context for the bit table printed in debug
configure: Add error_resilience as dependency to the eatqi decoder

This makes standalone compilation of the eatqi decoder
succeed. The dependency comes from the shared mpeg12dec.o file.

Signed-off-by: Martin Storsjö <martin@martin.st>
win32: Allow other programs to open the same files

In order to match Linux behaviour better our Windows-specific
open() replacement should disable Windows default file locking.

Signed-off-by: Martin Storsjö <martin@martin.st>
win32: Make ff_win32_open more robust

- Make MultiByteToWideChar fail when it encounters invalid encoding.
  Without this, invalid characters might just be skipped
- When MultiByteToWideChar fails, assume the file name is in CP_ACP
  and open it via normal open function, even when the file will be
  written
- When malloc fails return error instead of crashing

Signed-off-by: Martin Storsjö <martin@martin.st>
win32: Use 64-bit fstat/lseek variants for MSVC as well

Signed-off-by: Martin Storsjö <martin@martin.st>
wavpack: check K, fix assertion failure

Instead of this it would be possible to change the code to support
larger K but that would make the code slower and probably still need
checks on K.
This variant is choosen as there are no known valid files that need
larger K

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vp3: Check fps validity more completely

Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
electronicarts: check timebase, fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
estimate_timings_from_bit_rate: Check timebase and bitrate

Fixes integer overflow and assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>