ffmpeg.git
4 years agonutdec: fix memleaks on error in nut_read_header
Andreas Cadhalpun [Tue, 28 Apr 2015 18:58:21 +0000 (20:58 +0200)]
nutdec: fix memleaks on error in nut_read_header

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '0f50c53cfb959162f2bccc1a2c2e066d35723595' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:39:24 +0000 (21:39 +0200)]
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>
4 years agoMerge commit 'a55a70644872027fdf76a75edf12a09c9008880f' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:24:39 +0000 (21:24 +0200)]
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>
4 years agoavformat/avidec: print a warning for negative sample_size
Michael Niedermayer [Mon, 4 May 2015 21:42:24 +0000 (23:42 +0200)]
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>
4 years agoavidec: avoid infinite loop due to negative ast->sample_size
Andreas Cadhalpun [Mon, 4 May 2015 21:01:45 +0000 (23:01 +0200)]
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>
4 years agoMerge commit '21b21aed797b5e636adcf2df811f96a95f208930' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:22:59 +0000 (21:22 +0200)]
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>
4 years agonutdec: check chapter creation in decode_info_header
Andreas Cadhalpun [Tue, 28 Apr 2015 18:57:59 +0000 (20:57 +0200)]
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>
4 years agoMerge commit 'cb5324200ccdc693dd5b28dcd7d4b722fad83ea2' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:19:35 +0000 (21:19 +0200)]
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>
4 years agoMerge commit 'ac1660509ecfbeca7b63eb5ab8360011180e705b' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:08:45 +0000 (21:08 +0200)]
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>
4 years agoapedec: prevent out of array writes in decode_array_0000
Andreas Cadhalpun [Tue, 28 Apr 2015 09:13:43 +0000 (11:13 +0200)]
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>
4 years agoMerge commit '386e80610de282c92ad5897683ccaf2675766ac5' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:07:24 +0000 (21:07 +0200)]
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>
4 years agoMerge commit '744d813bcf527481f2217428fa08bfee8642935b' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:07:02 +0000 (21:07 +0200)]
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>
4 years agoavformat/mpegts: Detect changes in packet through CRC instead of just the 5bit version
Michael Niedermayer [Fri, 1 May 2015 00:14:14 +0000 (02:14 +0200)]
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 e0153145f6f8f3aa813652980862bafc8fd9b5c9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: reset last_ver on corrupted packets
Michael Niedermayer [Fri, 1 May 2015 00:13:26 +0000 (02:13 +0200)]
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>
4 years agoavformat/mpegts: Factorize version checking code out
Michael Niedermayer [Wed, 29 Apr 2015 20:24:09 +0000 (22:24 +0200)]
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>
4 years agoavformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet
Michael Niedermayer [Wed, 29 Apr 2015 04:26:18 +0000 (06:26 +0200)]
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 14e9a20083c9c17c9431754bf13e458293c1ead4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: reset last_version on seeking
Michael Niedermayer [Wed, 29 Apr 2015 03:00:51 +0000 (05:00 +0200)]
avformat/mpegts: reset last_version on seeking

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '844201e35fe575710be8218d45828df49b77f205' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:56:10 +0000 (20:56 +0200)]
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>
4 years agoMerge commit 'f77c9d71615e17414aacbb1720693b800a5a32d3' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:50:46 +0000 (20:50 +0200)]
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>
4 years agoMerge commit '4415d0f3bbaeb287327ef101ae98d727a69d9af1' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:48:19 +0000 (20:48 +0200)]
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>
4 years agoMerge commit '8ae4d4e117626313e0b7df746e82de84d00d160a' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:40:33 +0000 (20:40 +0200)]
Merge commit '8ae4d4e117626313e0b7df746e82de84d00d160a' into release/2.4

* commit '8ae4d4e117626313e0b7df746e82de84d00d160a':
  mov: Fix little endian audio detection

Conflicts:
libavformat/mov.c

See: d2549ba9df1a1aac8c0ae19bfca2c81e508ba02e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:39:42 +0000 (20:39 +0200)]
Merge commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe' into release/2.4

* commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe':
  x86: Put COPY3_IF_LT under HAVE_6REGS

Conflicts:
libavcodec/x86/mathops.h

See: b38910c9790253b362839042a17e13252c1d4b90
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '9f6c36d961d27283808310e3ca1d8390b55fce9b' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:37:23 +0000 (20:37 +0200)]
Merge commit '9f6c36d961d27283808310e3ca1d8390b55fce9b' into release/2.4

* commit '9f6c36d961d27283808310e3ca1d8390b55fce9b':
  roqvideoenc: set enc->avctx in roq_encode_init

See: cf82c426fadf90105e1fb9d5ecd267cc3aa2b288
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '78a3a4580c5a547af4ae8682c662ea3a4699a599' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:25:47 +0000 (20:25 +0200)]
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>
4 years agoavformat/mp3dec: Check for avcodec_alloc_context3() failure
Michael Niedermayer [Thu, 26 Feb 2015 19:11:19 +0000 (20:11 +0100)]
avformat/mp3dec: Check for avcodec_alloc_context3() failure

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mp3dec: properly allocate dummy AVCodecContext
Michael Niedermayer [Thu, 26 Feb 2015 18:59:44 +0000 (19:59 +0100)]
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 6ad42b3e15478284321dd285acaf189a16590854)

Conflicts:

libavformat/mp3dec.c

4 years agoMerge commit '7244cefd6e6ba7258cb022dfd7a284099d88a3e8' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:14:16 +0000 (20:14 +0200)]
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>
4 years agopng: Set the color range as full range
wm4 [Fri, 8 May 2015 15:01:50 +0000 (17:01 +0200)]
png: Set the color range as full range

The format uses full range for the gray formats.

CC: libav-stable@libav.org
4 years agoavi: Validate sample_size
Andreas Cadhalpun [Wed, 6 May 2015 00:26:57 +0000 (02:26 +0200)]
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>
4 years agonut: Check chapter creation in decode_info_header
Andreas Cadhalpun [Tue, 28 Apr 2015 18:57:59 +0000 (20:57 +0200)]
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
4 years agoalac: Reject rice_limit 0 if compression is used
Andreas Cadhalpun [Thu, 23 Apr 2015 22:01:43 +0000 (00:01 +0200)]
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
4 years agoape: Support _0000 files with nblock smaller than 64
Andreas Cadhalpun [Wed, 29 Apr 2015 18:39:22 +0000 (20:39 +0200)]
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>
4 years agomux: Do not leave stale side data pointers in ff_interleave_add_packet()
Michael Niedermayer [Fri, 1 May 2015 22:55:42 +0000 (23:55 +0100)]
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>
4 years agoavresample: Reallocate the internal buffer to the correct size
Luca Barbato [Mon, 27 Apr 2015 23:55:10 +0000 (01:55 +0200)]
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>
4 years agompegts: Update the PSI/SI table only if the version change
John Högberg [Tue, 28 Apr 2015 08:20:33 +0000 (10:20 +0200)]
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>
4 years agortsp: Make sure we don't write too many transport entries into a fixed-size array
Martin Storsjö [Fri, 24 Apr 2015 09:38:09 +0000 (12:38 +0300)]
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>
4 years agortpenc_jpeg: Handle case of picture dimensions not dividing by 8
Andrey Utkin [Fri, 10 Apr 2015 21:54:10 +0000 (00:54 +0300)]
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>
4 years agomov: Fix little endian audio detection
Vittorio Giovara [Fri, 13 Mar 2015 19:45:14 +0000 (19:45 +0000)]
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

4 years agox86: Put COPY3_IF_LT under HAVE_6REGS
Luca Barbato [Mon, 16 Mar 2015 10:26:48 +0000 (11:26 +0100)]
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
4 years agoroqvideoenc: set enc->avctx in roq_encode_init
Andreas Cadhalpun [Mon, 9 Mar 2015 18:24:09 +0000 (19:24 +0100)]
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>
4 years agomp3: Properly use AVCodecContext API
Vittorio Giovara [Mon, 9 Mar 2015 23:02:00 +0000 (23:02 +0000)]
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
4 years agolibvpx: Fix mixed use of av_malloc() and av_reallocp()
Vittorio Giovara [Sun, 8 Mar 2015 21:08:16 +0000 (21:08 +0000)]
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>
4 years agolavfi/fade: Do not overread input buffer.
Carl Eugen Hoyos [Wed, 25 Feb 2015 14:07:18 +0000 (15:07 +0100)]
lavfi/fade: Do not overread input buffer.
(cherry picked from commit ab3ff19f08b7a83e320c39ab066f289c242b8030)

4 years agotests: drop bc dependency
Clément Bœsch [Mon, 19 Jan 2015 21:56:59 +0000 (22:56 +0100)]
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

4 years agoMerge commit '8b86c2ed2eb29dce137b26e66a9bddd50f72817f' into release/2.4
Michael Niedermayer [Wed, 6 May 2015 01:48:31 +0000 (03:48 +0200)]
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>
4 years agoMerge commit '378ee3bad5b99e8f90864af9bc851590e0f64825' into release/2.4
Michael Niedermayer [Wed, 6 May 2015 01:34:45 +0000 (03:34 +0200)]
Merge commit '378ee3bad5b99e8f90864af9bc851590e0f64825' into release/2.4

* commit '378ee3bad5b99e8f90864af9bc851590e0f64825':
  alsdec: only adapt order for positive max_order

See: 58d605ee9b3277289278dc40e022311f8e083833
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '41a89cba6086de2bd24f9ec7e21200fa162505e9' into release/2.4
Michael Niedermayer [Wed, 6 May 2015 01:34:04 +0000 (03:34 +0200)]
Merge commit '41a89cba6086de2bd24f9ec7e21200fa162505e9' into release/2.4

* commit '41a89cba6086de2bd24f9ec7e21200fa162505e9':
  alsdec: check sample pointer range in revert_channel_correlation

Conflicts:
libavcodec/alsdec.c

See: afc7748d1f6abc4b3b1cc957b0fa6941837db3d0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '7b66cf5ce7fdb8b3fa13459aab3f4d6ab559f1ea' into release/2.4
Michael Niedermayer [Wed, 6 May 2015 01:20:42 +0000 (03:20 +0200)]
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>
4 years agoMerge commit '97010c74cbff177b58daf9a092b4e37a7da26f85' into release/2.4
Michael Niedermayer [Wed, 6 May 2015 01:09:49 +0000 (03:09 +0200)]
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>
4 years agoalsdec: limit avctx->bits_per_raw_sample to 32
Andreas Cadhalpun [Sat, 18 Apr 2015 18:29:13 +0000 (20:29 +0200)]
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>
4 years agoMerge commit '0d3a7dd26490156b607541dd2e1faeaa0fc61a88' into release/2.4
Michael Niedermayer [Wed, 6 May 2015 01:06:55 +0000 (03:06 +0200)]
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>
4 years agoRevert "lavfi: always check av_expr_parse_and_eval() return value"
Anton Khirnov [Sat, 2 May 2015 07:09:52 +0000 (09:09 +0200)]
Revert "lavfi: always check av_expr_parse_and_eval() return value"

This reverts commit 63be97ec403023fb664798432acedaf6e6922527.

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

(cherry picked from commit 3735b5c616770429572f86aabdaec39c6ebb8818)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoalsdec: only adapt order for positive max_order
Andreas Cadhalpun [Wed, 22 Apr 2015 14:03:41 +0000 (16:03 +0200)]
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 60f1cc4a1ffcbf24acbb543988ceeaec76b70818)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoalsdec: check sample pointer range in revert_channel_correlation
Andreas Cadhalpun [Tue, 21 Apr 2015 17:28:30 +0000 (19:28 +0200)]
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 94bb1ce882a12b6d7a1fa32715a68121b39ee838)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoaacpsy: correct calculation of minath in psy_3gpp_init
Andreas Cadhalpun [Tue, 21 Apr 2015 16:43:55 +0000 (18:43 +0200)]
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 110f7f35fb615b97d983b1c6c6a714fddd28bcbe)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoalsdec: limit avctx->bits_per_raw_sample to 32
Andreas Cadhalpun [Sat, 18 Apr 2015 18:29:13 +0000 (20:29 +0200)]
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 e191aaca44b986816695e3b7ecfae64697fd6631)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoaasc: return correct buffer size from aasc_decode_frame
Andreas Cadhalpun [Thu, 16 Apr 2015 17:12:02 +0000 (19:12 +0200)]
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 8fc8024ea56e814cd257d5fe27b21a865080782f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoChangelog, fix typos n2.4.9
Michael Niedermayer [Sun, 26 Apr 2015 15:47:03 +0000 (17:47 +0200)]
Changelog, fix typos

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoUpdate for FFmpeg 2.4.9 release
Michael Niedermayer [Sat, 25 Apr 2015 15:10:18 +0000 (17:10 +0200)]
Update for FFmpeg 2.4.9 release

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agotests/fate-run: do not attempt to parse tiny_psnrs output if it failed
Michael Niedermayer [Thu, 23 Apr 2015 02:27:56 +0000 (04:27 +0200)]
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 c0d847e457c1ef72843a63853f1135d52b74131e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoalac: reject rice_limit 0 if compression is used
Andreas Cadhalpun [Thu, 23 Apr 2015 22:01:43 +0000 (00:01 +0200)]
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 4b657a1b1eedcf38bcf36e89a2f4be6f76b5ce09)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoalsdec: only adapt order for positive max_order
Andreas Cadhalpun [Wed, 22 Apr 2015 14:03:41 +0000 (16:03 +0200)]
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 58d605ee9b3277289278dc40e022311f8e083833)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf: Reset global flag on deinit
Vittorio Giovara [Wed, 22 Apr 2015 13:59:56 +0000 (14:59 +0100)]
lavf: Reset global flag on deinit

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agobink: check vst->index_entries before using it
Andreas Cadhalpun [Wed, 22 Apr 2015 15:08:51 +0000 (17:08 +0200)]
bink: check vst->index_entries before using it

This fixes a NULL pointer dereference if vst->duration is 0.

The problem was introduced in commit 0588acaf.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agompeg4videodec: only allow a positive length
Andreas Cadhalpun [Wed, 22 Apr 2015 14:32:42 +0000 (16:32 +0200)]
mpeg4videodec: only allow a positive length

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoalsdec: check sample pointer range in revert_channel_correlation
Andreas Cadhalpun [Tue, 21 Apr 2015 17:25:50 +0000 (19:25 +0200)]
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.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit afc7748d1f6abc4b3b1cc957b0fa6941837db3d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264_refs: Do not set reference to things which dont exist
Michael Niedermayer [Sat, 4 Apr 2015 16:08:23 +0000 (18:08 +0200)]
avcodec/h264_refs: Do not set reference to things which dont exist

Fixes deadlock
Fixes Ticket4428
Fixes Ticket4429

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: Fail for invalid mixed IDR / non IDR frames in slice threading mode
Michael Niedermayer [Sat, 4 Apr 2015 17:28:33 +0000 (19:28 +0200)]
avcodec/h264: Fail for invalid mixed IDR / non IDR frames in slice threading mode

Fixes Ticket4408

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoh264: avoid unnecessary calls to get_format
Rainer Hochecker [Tue, 31 Mar 2015 06:27:01 +0000 (08:27 +0200)]
h264: avoid unnecessary calls to get_format

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/pca: Check for av_malloc* failures
Michael Niedermayer [Mon, 30 Mar 2015 02:37:42 +0000 (04:37 +0200)]
avutil/pca: Check for av_malloc* failures

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoalsdec: validate time diff index
Andreas Cadhalpun [Sat, 18 Apr 2015 18:09:28 +0000 (20:09 +0200)]
alsdec: validate time diff index

If begin is smaller than t, the subtraction 'begin -= t' wraps around,
because begin is unsigned. The same applies for end < t.

This causes segmentation faults.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/alsdec: Use av_mallocz_array() for chan_data to ensure the arrays never conta...
Michael Niedermayer [Sat, 18 Apr 2015 18:50:23 +0000 (20:50 +0200)]
avcodec/alsdec: Use av_mallocz_array() for chan_data to ensure the arrays never contain random data

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

Conflicts:

libavcodec/alsdec.c

4 years agoalsdec: ensure channel reordering is reversible
Andreas Cadhalpun [Sat, 18 Apr 2015 16:31:36 +0000 (18:31 +0200)]
alsdec: ensure channel reordering is reversible

If the same idx is used for more than one i, at least one entry in
sconf->chan_pos remains uninitialized.

This can cause segmentation faults.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/atrac3plusdsp: fix on stack alignment
Michael Niedermayer [Fri, 17 Apr 2015 09:58:41 +0000 (11:58 +0200)]
avcodec/atrac3plusdsp: fix on stack alignment

Fixes fate failure on ARM
(cherry picked from commit 38f67260684aec8a02d87ab4056b1a1fbf964c03)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoac3: validate end in ff_ac3_bit_alloc_calc_mask
Andreas Cadhalpun [Thu, 16 Apr 2015 19:25:26 +0000 (21:25 +0200)]
ac3: validate end in ff_ac3_bit_alloc_calc_mask

This fixes an invalid read if end is 0:
     band_end   = ff_ac3_bin_to_band_tab[end-1] + 1;

Depending on what is before the array, this can cause stack smashing,
when band_end becomes too large.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaacpsy: avoid psy_band->threshold becoming NaN
Andreas Cadhalpun [Thu, 16 Apr 2015 18:04:54 +0000 (20:04 +0200)]
aacpsy: avoid psy_band->threshold becoming NaN

If band->thr is 0.0f, the division is undefined, making norm_fac not a
number or infinity, which causes psy_band->threshold to become NaN.

This is passed on to other variables until it finally reaches
sce->sf_idx and is converted to an integer (-2147483648).

This causes a segmentation fault when it is used as array index.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e224aa41917454e7b5c23d9f2541425743ce595a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaasc: return correct buffer size from aasc_decode_frame
Andreas Cadhalpun [Thu, 16 Apr 2015 17:12:02 +0000 (19:12 +0200)]
aasc: return correct buffer size from aasc_decode_frame

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaacdec: consistently use avctx for logging in decode_eld_specific_config
Andreas Cadhalpun [Thu, 16 Apr 2015 14:58:32 +0000 (16:58 +0200)]
aacdec: consistently use avctx for logging in decode_eld_specific_config

ac may be NULL and then accessing ac->avctx results in a segmentation fault.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomsrledec: use signed pixel_ptr in msrle_decode_pal4
Andreas Cadhalpun [Thu, 16 Apr 2015 12:49:08 +0000 (14:49 +0200)]
msrledec: use signed pixel_ptr in msrle_decode_pal4

This fixes segmentation faults, when pic->linesize[0] is negative.
In that case 'line * pic->linesize[0] + pixel_ptr' is treated as
unsigned and wraps around.

This reverts commit 7d78a964.
The problem was introduced in commit f7e1367f, which should obsolete
that commit.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample/swresample-test: Randomly wipe out channel counts
Michael Niedermayer [Sun, 12 Apr 2015 20:08:52 +0000 (22:08 +0200)]
swresample/swresample-test: Randomly wipe out channel counts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample: Check channel layouts and channels against each other and print human...
Michael Niedermayer [Sun, 12 Apr 2015 19:08:09 +0000 (21:08 +0200)]
swresample: Check channel layouts and channels against each other and print human readable error messages

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample: Allow reinitialization without ever setting channel layouts
Michael Niedermayer [Sun, 12 Apr 2015 18:50:53 +0000 (20:50 +0200)]
swresample: Allow reinitialization without ever setting channel layouts
(cherry picked from commit 80a28c7509a11114e1aea5b208d56c6646d69c07)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample: Allow reinitialization without ever setting channel counts
Michael Niedermayer [Sun, 12 Apr 2015 17:43:08 +0000 (19:43 +0200)]
swresample: Allow reinitialization without ever setting channel counts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: Do not fail with randomly truncated VUIs
Michael Niedermayer [Fri, 10 Apr 2015 16:35:07 +0000 (18:35 +0200)]
avcodec/h264: Do not fail with randomly truncated VUIs

Fixes Ticket4445

Tested-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bc48c88918f767e0dffcd138ae8e5c3052e8a92f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264_ps: Move truncation check from VUI to SPS
Michael Niedermayer [Wed, 8 Apr 2015 20:18:35 +0000 (22:18 +0200)]
avcodec/h264_ps: Move truncation check from VUI to SPS

This more completely checks for truncation

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: Be more tolerant to changing pps id between slices
Michael Niedermayer [Thu, 9 Apr 2015 11:50:07 +0000 (13:50 +0200)]
avcodec/h264: Be more tolerant to changing pps id between slices

Fixes Ticket4446

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

Conflicts:

libavcodec/h264.c
(cherry picked from commit 0cd0fa9d0baabd2dc0442ed8b53ba65282733b61)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/aacdec: Fix storing state before PCE decode
Michael Niedermayer [Wed, 8 Apr 2015 22:04:44 +0000 (00:04 +0200)]
avcodec/aacdec: Fix storing state before PCE decode

Fixes Ticket4460

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: reset the counts in the correct context
Michael Niedermayer [Wed, 8 Apr 2015 11:38:55 +0000 (13:38 +0200)]
avcodec/h264: reset the counts in the correct context

Fixes null pointer dereference

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

4 years agoavcodec/h264_slice: Dont reset mb_aff_frame per slice
Michael Niedermayer [Wed, 8 Apr 2015 10:29:47 +0000 (12:29 +0200)]
avcodec/h264_slice: Dont reset mb_aff_frame per slice

Fixes null pointer dereference
Fixes Ticket4440

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

Conflicts:

libavcodec/h264_slice.c
(cherry picked from commit ce6d38e9ed0842870f3cd5414937bb6d1f2417d9)

4 years agotests: Fix test name for pixfmts tests(cherry picked from commit e1ee0521a698809ed216...
Timothy Gu [Mon, 10 Nov 2014 05:37:18 +0000 (21:37 -0800)]
tests: Fix test name for pixfmts tests(cherry picked from commit e1ee0521a698809ed216e9e5c11bd2bbb466ed04)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: finish previous slices before switching to single thread mode
Michael Niedermayer [Tue, 7 Apr 2015 00:47:36 +0000 (02:47 +0200)]
avcodec/h264: finish previous slices before switching to single thread mode

Fixes null pointer dereference
Fixes Ticket4438

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

Conflicts:

libavcodec/h264.c
(cherry picked from commit 09cc7aee3f4d1bd1d7107d38520f782c62c14036)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: Fix race between slices where one overwrites data from the next
Michael Niedermayer [Mon, 6 Apr 2015 22:40:21 +0000 (00:40 +0200)]
avcodec/h264: Fix race between slices where one overwrites data from the next

Fixes non deterministic crash in ticket4408/fuzz2.264
Likely fixes other samples as well

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

Conflicts:

libavcodec/h264.h
libavcodec/h264_slice.c
(cherry picked from commit dbbc42858e87cdd04e6c3b7694f8b394d4bfcdc6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/utils: avoid discarded streams in av_find_default_stream_index()
Michael Niedermayer [Mon, 6 Apr 2015 02:20:51 +0000 (04:20 +0200)]
avformat/utils: avoid discarded streams in av_find_default_stream_index()

Fixes Ticket2010

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/utils: Ensure that AVFMT_FLAG_CUSTOM_IO is set before use
Michael Niedermayer [Mon, 20 Apr 2015 20:22:31 +0000 (22:22 +0200)]
avformat/utils: Ensure that AVFMT_FLAG_CUSTOM_IO is set before use

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/img2dec: do not rewind custom io buffers
Michael Niedermayer [Mon, 20 Apr 2015 21:59:53 +0000 (23:59 +0200)]
avformat/img2dec: do not rewind custom io buffers

Fixes double free with some applications

Fixes vlc ticket14121
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e6e8cc8ce9c2a398fbb51254a5067f4bd3c4fa8a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agofate: Include branch information in the payload header
Timothy Gu [Sun, 12 Apr 2015 15:28:42 +0000 (08:28 -0700)]
fate: Include branch information in the payload header

The server is properly equiped not to choke on that now.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '3e1c9da38b849ce2982b516004370081fdd89ed0' into release/2.4
Michael Niedermayer [Sun, 19 Apr 2015 13:57:05 +0000 (15:57 +0200)]
Merge commit '3e1c9da38b849ce2982b516004370081fdd89ed0' into release/2.4

* commit '3e1c9da38b849ce2982b516004370081fdd89ed0':
  matroskadec: fix crash when parsing invalid mkv

See: d9fe6b926cd619c311e45e0ae352cf09713c482c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomatroskadec: fix crash when parsing invalid mkv
Thomas Guillem [Fri, 10 Apr 2015 17:04:51 +0000 (19:04 +0200)]
matroskadec: fix crash when parsing invalid mkv

CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit b8d7f3186e86234f6255f5e8ee9e98573b4d9a6e)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agodoc: add aarch64 cpuflags to fftools documentation
James Almer [Fri, 10 Apr 2015 23:52:29 +0000 (20:52 -0300)]
doc: add aarch64 cpuflags to fftools documentation

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 9fc45681e0c4736e4475966a70402d22c76a2965)

4 years agodoc: add missing arm cpuflags to fftools documentation
James Almer [Fri, 10 Apr 2015 23:51:35 +0000 (20:51 -0300)]
doc: add missing arm cpuflags to fftools documentation

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 666ec9bd097201eaacb9c04da526cb2710cb9cab)