Commit Graph

66954 Commits

Author SHA1 Message Date
Michael Niedermayer
1ab5f63941 Merge commit '0f50c53cfb959162f2bccc1a2c2e066d35723595' into release/2.4
* commit '0f50c53cfb959162f2bccc1a2c2e066d35723595':
  png: Set the color range as full range

Conflicts:
	libavcodec/pngdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:54:04 +02:00
Michael Niedermayer
9005075f39 Merge commit 'a55a70644872027fdf76a75edf12a09c9008880f' into release/2.4
* commit 'a55a70644872027fdf76a75edf12a09c9008880f':
  avi: Validate sample_size

Conflicts:
	libavformat/avidec.c

See: ca234639ac49a0dc073ac1f10977979acdb94f97
See: c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:24:51 +02:00
Michael Niedermayer
9f4979b24c avformat/avidec: print a warning for negative sample_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:24:27 +02:00
Andreas Cadhalpun
df0003030a avidec: avoid infinite loop due to negative ast->sample_size
If max in clean_index is set to a negative ast->sample_size, the
following loop never ends:
        while (max < 1024)
            max += max;

Thus set ast->sample_size to 0 if it would otherwise be negative.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:24:22 +02:00
Michael Niedermayer
95b42188d6 Merge commit '21b21aed797b5e636adcf2df811f96a95f208930' into release/2.4
* commit '21b21aed797b5e636adcf2df811f96a95f208930':
  nut: Check chapter creation in decode_info_header

Conflicts:
	libavformat/nutdec.c

See: 3ff1af2b0db7132d5717be6395227a94c8abab07
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:23:13 +02:00
Andreas Cadhalpun
63afe5b914 nutdec: check chapter creation in decode_info_header
This fixes a segmentation fault when accessing the metadata.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:21:39 +02:00
Michael Niedermayer
2070149cbb Merge commit 'cb5324200ccdc693dd5b28dcd7d4b722fad83ea2' into release/2.4
* commit 'cb5324200ccdc693dd5b28dcd7d4b722fad83ea2':
  alac: Reject rice_limit 0 if compression is used

Conflicts:
	libavcodec/alac.c

See: 4b657a1b1eedcf38bcf36e89a2f4be6f76b5ce09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 21:20:13 +02:00
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: 699341d647f7af785fb8ceed67604467b0b9ab12
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 699341d647f7af785fb8ceed67604467b0b9ab12)

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: bfb3ed1a9d5dafdc185080fdd88d02ff7221d30a
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 4b6be54bed27eb7fc8f005505ff38e71b3c86cec)

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 4e8d01f20ce82b49f47c704a461c5d30866affaf)

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: 6ad42b3e15478284321dd285acaf189a16590854
See: b851bc20c6931c084710e69f7eec30d8c1bdb68e
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
wm4
0f50c53cfb png: Set the color range as full range
The format uses full range for the gray formats.

CC: libav-stable@libav.org
2015-05-19 12:14:50 +01:00
Andreas Cadhalpun
a55a706448 avi: Validate sample_size
And either error out or set it to 0 if it is negative.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-19 12:14:44 +01:00
Andreas Cadhalpun
21b21aed79 nut: Check chapter creation in decode_info_header
This fixes a segmentation fault when accessing the metadata.

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

CC: libav-stable@libav.org
2015-05-19 12:14:39 +01:00
Andreas Cadhalpun
cb5324200c alac: Reject rice_limit 0 if compression is used
If in compression mode rice_limit = 0 leads to call
`show_bits(gb, k)` in `decode_scalar` with k = 0.

Request a sample in case it is valid and it should be accepted.

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

CC: libav-stable@libav.org
2015-05-19 12:14:30 +01: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 a982c5d74fbc7ff5bd2f2f73af61ae48e9b1bcc6)
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: 98d4a07ccf97696c6b7e38e6b0e04e8fd5eba9c3
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: 4c2b88678b436f59132386d9be2fc143e3ee480d
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 4c2b88678b436f59132386d9be2fc143e3ee480d)

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: 0be54ad280cf114c02306b7063147e8379f8ed1e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 03:07:10 +02:00