jpeg2000: Validate resolution levels

There are 32 maximum decomposition levels, thus 33 resolution levels.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Check code-block size

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Define the maximum decomposition levels

And define the resolution levels according.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Clean up return paths and error messages

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Use bytestream2

Prevent a number of overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Merge commit '5650e331a733711b809bc27f968500f0f5530126'

* commit '5650e331a733711b809bc27f968500f0f5530126':
  jpeg2000: Validate resolution levels

Conflicts:
	libavcodec/jpeg2000dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
doc: add script to compute texi files dependencies

Replace the inline awk script with a Perl script which tracks the
dependencies recursively.

This allows to correctly track dependencies for files including files
with a second level include (for example: ffmpeg-devices.texi ->
devices.texi -> outdevs.texi).

This also adds a dependency on perl for computing the dependencies, which
should not be a problem since perl is already required all the way for
building documentation.
doc/muxers: Add AIFF doc

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
examples/muxing: make more compact audio/video_time computation
Merge commit 'fbcc03db8f3919e2ea46d6ad11a00906b1c0ef0e'

* commit 'fbcc03db8f3919e2ea46d6ad11a00906b1c0ef0e':
  jpeg2000: Check code-block size

Conflicts:
	libavcodec/jpeg2000dec.c

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

* commit 'be3271009ef893fbed9640e8edbd771685fd957b':
  jpeg2000: Define the maximum decomposition levels

Conflicts:
	libavcodec/jpeg2000.h

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

* commit '5efadcb8cdef6fc5ca5f1f72e45ef3b23016b1c4':
  jpeg2000: Clean up return paths and error messages

Conflicts:
	libavcodec/jpeg2000dec.c

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

* commit '1a3598aae768465a8efc8475b6df5a8261bc62fc':
  jpeg2000: Use bytestream2

Conflicts:
	libavcodec/jpeg2000dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Revert "doc: add script to compute texi files dependencies"

This reverts commit 628ceac6526724d35cb390cc1f88344f4ea22eb4.

The commit broke out of tree builds
Merge commit '57bc64e'

* commit '57bc64e':
  jpeg2000: Use bytestream2
  jpeg2000: Clean up return paths and error messages
  jpeg2000: Define the maximum decomposition levels
  jpeg2000: Check code-block size

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