vdpau/h264: request MAIN rather than BASELINE VDPAU profile for CBP

The H.264 Constrained Baseline Profile (CBP) is a subset of both the
Main Profile and the Baseline Profile. In principles, a hardware
decoder that supports either of those can decode CBP content. As it
happens, Main is supported by all VDPAU drivers, and Baseline is not.

So favor map CBP to MP for now. Hopefully in the future libvdpau will
offer an explicit choice for CBP.

This fixes bug 757.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
vdpau: return MAIN instead of BASELINE for H.264 CBP

This is the same as the previous change, but for applications using the
old API (such as VLC 2.2).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
lavd: fix building x11grab after a6674d2
Merge commit '26ab504ad8d2b23535c9a0ad43bf1fd0e6aa0893'

* commit '26ab504ad8d2b23535c9a0ad43bf1fd0e6aa0893':
  vdpau/h264: request MAIN rather than BASELINE VDPAU profile for CBP

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'ce91b2eae6ea52fc1a7003566d26db20ca62d745'

* commit 'ce91b2eae6ea52fc1a7003566d26db20ca62d745':
  vdpau: return MAIN instead of BASELINE for H.264 CBP

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '4ad1eba011860224831ce0bb3123f6f55716b68a'

* commit '4ad1eba011860224831ce0bb3123f6f55716b68a':
  lavd: fix building x11grab after a6674d2

no change as the buggy line was not in FFmpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avdevice/xcbgrab: set avclass category

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dv: increase VLC reading bits to 10

This also requires a bump in the table size of bit patterns to 1664.
From 356 to 348 cycles.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dvenc: mark encoder as intra

And thus allow various multithreading.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dxa: check dimensions

Fixes out of array access
Fixes: asan_heap-oob_11222fb_21_020.dxa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mvdec: Check size for validity in var_read_string()

Fixes out of array read
Fixes: asan_heap-oob_49b1e5_12_011.movie
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mvdec: Check size in read_table() for validity

This check is redundant with the previous commit but it provides
better error messages and feedback while the previous commit
ensures that var_read_string() doesnt return uninitialized arrays
if it itself is feeded with an invalid size possibly through a
different future codepath.

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