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>
movenc: Add a flag for using default-base-is-moof in tfhd atoms

Similarly to the omit_tfhd_offset flag added in e7bf085b, this
avoids writing absolute byte positions to the file, making them
more easily streamable.

This is a new feature from 14496-12:2012, so application support
isn't necessarily too widespread yet (support for it in libav was
added in 20f95f21f in July 2014).

Signed-off-by: Martin Storsjö <martin@martin.st>
avcodec/g2meet: check tile dimensions to avoid integer overflow

Fixes out of array access
Fixes: asan_heap-oob_12a55d3_30_029.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '573b1de2d7f1db71030f91ecdded7d0bc071f6b6'

* commit '573b1de2d7f1db71030f91ecdded7d0bc071f6b6':
  movenc: Don't use track_id to decide which track is the first in a moof

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

* commit 'b2b79eca6fae2466a53c5daa163a37e2474364fc':
  movenc: Don't check the custom IO flag when using faststart

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

* commit '1e0b81abe86dc09dd34d60d57f92de5f12d65818':
  movenc: Use a local variable consistently

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

* commit 'a9911a1b2df37ca808e06dc30627215f4ec9a9e4':
  doc: Document the omit_tfhd_offset flag to the mp4 muxer

Conflicts:
	doc/muxers.texi

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

* commit '600d5ee6b12bad144756b0772319bb04796bc528':
  movenc: Signal iso6 in compatible_brands when using tfdt

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fix disabling libxcb-shm and libxcb-xfixes.
Fix xcbgrab build if shm is not available.
Fix compilation of xcbgrab if xcb/shape.h is not available.

Old versions of libxcb do not provide xcb_shape_rectangles().
The issue can be fixed differently but this small change fixes
some fate platforms and a user reported compilation problem.

Reported and tested by trac user kevmitch.
Fixes ticket #4067.
ffprobe.xsd: add packets_and_frames element definition

This allows validation of ffprobe XML output if -show_packets and
-show_frames are both set.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
avdevice/xcbgrab: Fix offset support

Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/cook: check that the subpacket sizes fit in block_align

Fixes out of array read
Fixes: asan_heap-oob_fb5c50_19_018.rmvb
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/svq1dec: zero terminate embedded message before printing

Fixes out of array access
Fixes: asan_stack-oob_49b1e5_10_009.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dxtory: use unaligned copy for unaligned addresses

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