Commit Graph

66943 Commits

Author SHA1 Message Date
Michael Niedermayer
3cc8285439 Merge commit 'ac1660509ecfbeca7b63eb5ab8360011180e705b' into release/2.4
* commit 'ac1660509ecfbeca7b63eb5ab8360011180e705b':
  ape: Support _0000 files with nblock smaller than 64

Conflicts:
	libavcodec/apedec.c

See: 699341d647
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:08:45 +02:00
Andreas Cadhalpun
4e4708ad80 apedec: prevent out of array writes in decode_array_0000
s->decoded_buffer is allocated with a min_size of:
    2 * FFALIGN(blockstodecode, 8) * sizeof(*s->decoded_buffer)

Then it is assigned to s->decoded[0] (and s->decoded_buffer + FFALIGN(blockstodecode, 8)
to s->decoded[1]) and passed as out buffer to decode_array_0000.

In this function 64 elements of the out buffer are written
unconditionally and outside the array if blockstodecode is too small.

This causes memory corruption, leading to segmentation faults or other
crashes.

Thus change decode_array_0000 to write at most blockstodecode elements
of the out buffer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 699341d647)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:08:36 +02:00
Michael Niedermayer
8624b49276 Merge commit '386e80610de282c92ad5897683ccaf2675766ac5' into release/2.4
* commit '386e80610de282c92ad5897683ccaf2675766ac5':
  mux: Do not leave stale side data pointers in ff_interleave_add_packet()

Conflicts:
	libavformat/mux.c

See: bfb3ed1a9d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:07:42 +02:00
Michael Niedermayer
39cb08cdc2 Merge commit '744d813bcf527481f2217428fa08bfee8642935b' into release/2.4
* commit '744d813bcf527481f2217428fa08bfee8642935b':
  avresample: Reallocate the internal buffer to the correct size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:07:02 +02:00
Michael Niedermayer
8f3787d068 avformat/mpegts: Detect changes in packet through CRC instead of just the 5bit version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e0153145f6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:57:48 +02:00
Michael Niedermayer
5b1befb074 avformat/mpegts: reset last_ver on corrupted packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4b6be54bed)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:57:42 +02:00
Michael Niedermayer
3d296c0ec1 avformat/mpegts: Factorize version checking code out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e8d01f20c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:57:34 +02:00
Michael Niedermayer
52242a387b avformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet
Fixes Detecting AAC with such descriptor if the parts needed for detection
are later in the stream

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 14e9a20083)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:57:25 +02:00
Michael Niedermayer
74b856e58b avformat/mpegts: reset last_version on seeking
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6397814926)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:57:07 +02:00
Michael Niedermayer
d45eef0814 Merge commit '844201e35fe575710be8218d45828df49b77f205' into release/2.4
* commit '844201e35fe575710be8218d45828df49b77f205':
  mpegts: Update the PSI/SI table only if the version change

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:56:10 +02:00
Michael Niedermayer
efb28e3c51 Merge commit 'f77c9d71615e17414aacbb1720693b800a5a32d3' into release/2.4
* commit 'f77c9d71615e17414aacbb1720693b800a5a32d3':
  rtsp: Make sure we don't write too many transport entries into a fixed-size array

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:50:54 +02:00
Michael Niedermayer
d5f2302aca Merge commit '4415d0f3bbaeb287327ef101ae98d727a69d9af1' into release/2.4
* commit '4415d0f3bbaeb287327ef101ae98d727a69d9af1':
  rtpenc_jpeg: Handle case of picture dimensions not dividing by 8

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:48:25 +02:00
Michael Niedermayer
60d0d68a8d Merge commit '8ae4d4e117626313e0b7df746e82de84d00d160a' into release/2.4
* commit '8ae4d4e117626313e0b7df746e82de84d00d160a':
  mov: Fix little endian audio detection

Conflicts:
	libavformat/mov.c

See: d2549ba9df
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:40:45 +02:00
Michael Niedermayer
b8d3c3ea86 Merge commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe' into release/2.4
* commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe':
  x86: Put COPY3_IF_LT under HAVE_6REGS

Conflicts:
	libavcodec/x86/mathops.h

See: b38910c979
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:39:54 +02:00
Michael Niedermayer
e6f17337cf Merge commit '9f6c36d961d27283808310e3ca1d8390b55fce9b' into release/2.4
* commit '9f6c36d961d27283808310e3ca1d8390b55fce9b':
  roqvideoenc: set enc->avctx in roq_encode_init

See: cf82c426fa
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:39:15 +02:00
Michael Niedermayer
d7888ff644 Merge commit '78a3a4580c5a547af4ae8682c662ea3a4699a599' into release/2.4
* commit '78a3a4580c5a547af4ae8682c662ea3a4699a599':
  mp3: Properly use AVCodecContext API

Conflicts:
	libavformat/mp3dec.c

See: 6ad42b3e15
See: b851bc20c6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:25:58 +02:00
Michael Niedermayer
86be9cda97 avformat/mp3dec: Check for avcodec_alloc_context3() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b851bc20c6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:25:11 +02:00
Michael Niedermayer
a7dedd8ea5 avformat/mp3dec: properly allocate dummy AVCodecContext
Fixes (harmless) use of uninitialized variable

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6ad42b3e15)

Conflicts:

	libavformat/mp3dec.c
2015-05-19 20:25:10 +02:00
Michael Niedermayer
d61022d55f Merge commit '7244cefd6e6ba7258cb022dfd7a284099d88a3e8' into release/2.4
* commit '7244cefd6e6ba7258cb022dfd7a284099d88a3e8':
  libvpx: Fix mixed use of av_malloc() and av_reallocp()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 20:15:15 +02:00
Andreas Cadhalpun
ac1660509e ape: Support _0000 files with nblock smaller than 64
The decode_array_0000 assumed that 64 is the minimal block size
while it is not.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-19 12:14:25 +01:00
Michael Niedermayer
386e80610d mux: Do not leave stale side data pointers in ff_interleave_add_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-19 12:14:18 +01:00
Luca Barbato
744d813bcf avresample: Reallocate the internal buffer to the correct size
Fixes the corner case in which the internal buffer size
is larger than input buffer provided and resizing it
before moving the left over samples would make it write
to now unallocated memory.

Bug-Id: 825
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-19 12:13:33 +01:00
John Högberg
844201e35f mpegts: Update the PSI/SI table only if the version change
If a PAT is finished while a PMT section filter is opened but
not yet finished, the PMT section filter is closed and all
the received data is discarded.

This is usually not an issue but some multiplexers (With very
quick PAT/PMT repetition settings) consistently emit a PMT
section start, then a PAT, and then the rest of the PMT,
causing the aforementioned behavior to result in no PMT being
finished.

In the most pathologic situation the stream information are lost
and the probe fallback miscategorizes subtitles as mp3 audio.

Avoid the issue through eliminating redundant PSI/SI table
updates by checking their version field, which is required by
the standard to be incremented on every change no matter how
minor.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-19 12:13:23 +01:00
Martin Storsjö
f77c9d7161 rtsp: Make sure we don't write too many transport entries into a fixed-size array
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-19 12:12:57 +01:00
Andrey Utkin
4415d0f3bb rtpenc_jpeg: Handle case of picture dimensions not dividing by 8
This fixes the calculation of the number of needed blocks to make
sure that ALL pixels are represented by the result.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-19 12:12:38 +01:00
Vittorio Giovara
8ae4d4e117 mov: Fix little endian audio detection
Set this field to TRUE if the audio component is to operate on
little-endian data, and FALSE otherwise.

However TRUE and FALSE are not defined. Since this flag is just a boolean,
interpret all values except for 0 as little endian.

Sample-Id: 64bit_FLOAT_Little_Endian.mov
2015-05-19 12:05:23 +01:00
Luca Barbato
2af720fe5f x86: Put COPY3_IF_LT under HAVE_6REGS
It uses 6 registers, unbreaks building on hardened x86 system.

Bug-Id: gentoo/541930
CC: libav-stable@libav.org
2015-05-19 12:04:41 +01:00
Andreas Cadhalpun
9f6c36d961 roqvideoenc: set enc->avctx in roq_encode_init
So far it is only set in roq_encode_frame, but it is used in
roq_encode_end to free the coded_frame. This currently segfaults if
roq_encode_frame is not called between roq_encode_init and
roq_encode_end.

CC:libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-19 12:03:48 +01:00
Vittorio Giovara
78a3a4580c mp3: Properly use AVCodecContext API
Rather than having an unitialized context on the stack, allocate it with
defaults and free it when unneeded.

CC: libav-stable@libav.org
2015-05-19 12:03:20 +01:00
Vittorio Giovara
7244cefd6e libvpx: Fix mixed use of av_malloc() and av_reallocp()
This buffer is resized when vpx_codec_get_cx_data() returns a
VPX_CODEC_STATS_PKT packet.

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-19 12:00:12 +01:00
Carl Eugen Hoyos
09764c9909 lavfi/fade: Do not overread input buffer.
(cherry picked from commit ab3ff19f08)
2015-05-17 12:47:33 +02:00
Clément Bœsch
07256a7a6e tests: drop bc dependency
We already have a dependency on awk and bc is sometimes not found in the
base system.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit a982c5d74f)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>

Conflicts:
	doc/platform.texi
2015-05-14 04:08:10 +02:00
Michael Niedermayer
f28d3f98c5 Merge commit '8b86c2ed2eb29dce137b26e66a9bddd50f72817f' into release/2.4
* commit '8b86c2ed2eb29dce137b26e66a9bddd50f72817f':
  Revert "lavfi: always check av_expr_parse_and_eval() return value"

See: 98d4a07ccf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:49:58 +02:00
Michael Niedermayer
146648771c Merge commit '378ee3bad5b99e8f90864af9bc851590e0f64825' into release/2.4
* commit '378ee3bad5b99e8f90864af9bc851590e0f64825':
  alsdec: only adapt order for positive max_order

See: 58d605ee9b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:35:00 +02:00
Michael Niedermayer
843b860ad9 Merge commit '41a89cba6086de2bd24f9ec7e21200fa162505e9' into release/2.4
* commit '41a89cba6086de2bd24f9ec7e21200fa162505e9':
  alsdec: check sample pointer range in revert_channel_correlation

Conflicts:
	libavcodec/alsdec.c

See: afc7748d1f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:34:18 +02:00
Michael Niedermayer
97d7c8d584 Merge commit '7b66cf5ce7fdb8b3fa13459aab3f4d6ab559f1ea' into release/2.4
* commit '7b66cf5ce7fdb8b3fa13459aab3f4d6ab559f1ea':
  aacpsy: correct calculation of minath in psy_3gpp_init

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:20:49 +02:00
Michael Niedermayer
8d3a967635 Merge commit '97010c74cbff177b58daf9a092b4e37a7da26f85' into release/2.4
* commit '97010c74cbff177b58daf9a092b4e37a7da26f85':
  alsdec: limit avctx->bits_per_raw_sample to 32

See: 4c2b88678b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:10:00 +02:00
Andreas Cadhalpun
1cb470934a alsdec: limit avctx->bits_per_raw_sample to 32
avctx->bits_per_raw_sample is used in get_sbits_long, which only
supports up to 32 bits.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4c2b88678b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:08:35 +02:00
Michael Niedermayer
4ba11b944e Merge commit '0d3a7dd26490156b607541dd2e1faeaa0fc61a88' into release/2.4
* commit '0d3a7dd26490156b607541dd2e1faeaa0fc61a88':
  aasc: return correct buffer size from aasc_decode_frame

See: 0be54ad280
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:07:10 +02:00
Anton Khirnov
8b86c2ed2e Revert "lavfi: always check av_expr_parse_and_eval() return value"
This reverts commit 63be97ec40.

All those calls were unchecked on purpose, as explained in the comments
in the code.

(cherry picked from commit 3735b5c616)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 21:41:52 +02:00
Andreas Cadhalpun
378ee3bad5 alsdec: only adapt order for positive max_order
For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 60f1cc4a1f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 21:41:43 +02:00
Andreas Cadhalpun
41a89cba60 alsdec: check sample pointer range in revert_channel_correlation
Also change the type of begin, end and smp to ptrdiff_t to make the
comparison well-defined.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 94bb1ce882)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 21:41:40 +02:00
Andreas Cadhalpun
7b66cf5ce7 aacpsy: correct calculation of minath in psy_3gpp_init
The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD.
This patch uses the first order approximation to determine it.

For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638)
not the one at 3410 (-5.24237967).

CC: libav-stabl@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 110f7f35fb)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 21:41:36 +02:00
Andreas Cadhalpun
97010c74cb alsdec: limit avctx->bits_per_raw_sample to 32
avctx->bits_per_raw_sample is used in get_sbits_long, which only
supports up to 32 bits.

CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit e191aaca44)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 21:41:32 +02:00
Andreas Cadhalpun
0d3a7dd264 aasc: return correct buffer size from aasc_decode_frame
CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8fc8024ea5)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-05-05 21:41:26 +02:00
Michael Niedermayer
de7b74d254 Changelog, fix typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-26 17:47:03 +02:00
Michael Niedermayer
73af011c79 Update for FFmpeg 2.4.9 release
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-25 17:10:18 +02:00
Michael Niedermayer
f6dd6b4fd2 tests/fate-run: do not attempt to parse tiny_psnrs output if it failed
This avoids confusing syntax errors with awk later

Likely fixes awk errors at:
http://buildd.debian-ports.org/status/fetch.php?pkg=ffmpeg&arch=sparc64&ver=7%3A2.6.2-1&stamp=1428928967

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Thanks-to: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> for the link
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c0d847e457)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-25 15:06:55 +02:00
Andreas Cadhalpun
dfe37f2be2 alac: reject rice_limit 0 if compression is used
If rice_limit is 0, k can be 0 in decode_scalar, which calls show_bits(gb, k).

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4b657a1b1e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-25 15:06:55 +02:00
Andreas Cadhalpun
b16a6c6709 alsdec: only adapt order for positive max_order
For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 58d605ee9b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-25 15:06:55 +02:00