xcbgrab: XCB-based screen capture

Matches the x11grab screen capture by features.
matroskaenc: write correct Display{Width, Height} in stereo encoding

should be the raw amount of pixels (for example 3840x1080 for full HD side by
side) and the DisplayWidth/Height in pixels should be the amount of pixels for
one plane (1920x1080 for that full HD stream)."

So, move the aspect ratio check in the mkv_write_stereo_mode() function
and always write the embl when stereo format and/or aspect ration is set.
Also add a few comments to that function.

CC: libav-stable@libav.org
Found-by: Asan Usipov <asan.usipov@gmail.com>
filmstripdec: avoid integer overflow

CC: libav-stable@libav.org
Bug-Id: CID 732246
bethsoftvid: check return value and clean memory

CC: libav-stable@libav.org
Bug-Id: CID 733777
mxfdec: reduce loop bound in mxf_read_pixel_layout()

Makes coverity less confused and code more readable.

Bug-Id: CID 732262
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
configure: Check only for xcb

xcb-utils are not needed anymore.
oggenc: remove unneeded null check

The code would have segfaulted before if oggstream were NULL.

CC: libav-stable@libav.org
Bug-Id: CID 732218
mtv: improve header check and avoid division by zero

CC: libav-stable@libav.org
Bug-Id: CID 732203 / CID 732204
fbdev: Use av_strerror
jack: Use av_strerror
assdec: check av_new_packet return value

CC: libav-stable@libav.org
Bug-Id: CID 703626
bethsoftvid: simplify return handling

Fixes a double free in case of av_packet_new_side_data() failure.
movenc: Don't use track_id to decide which track is the first in a moof

If one track doesn't have any samples within a moof, no traf/trun
is written for it. When the omit_tfhd_offset flag is set, none
of the tfhd atoms have any base_data_offset set, and the implicit
offset (end of previous track fragment data, or start of the moof
for the first trun) is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Don't check the custom IO flag when using faststart

The custom IO flag actually never is set for muxers, only for
demuxers, so the check was pointless (unless a user intentionally
would set the flag to signal using custom IO).

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Use a local variable consistently

Signed-off-by: Martin Storsjö <martin@martin.st>
doc: Document the omit_tfhd_offset flag to the mp4 muxer

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Signal iso6 in compatible_brands when using tfdt

Signed-off-by: Martin Storsjö <martin@martin.st>