ffmpeg.git
4 years agoavcodec/put_bits: Assert that there is enough space left in skip_put_bytes()
Michael Niedermayer [Mon, 25 May 2015 01:45:38 +0000 (03:45 +0200)]
avcodec/put_bits: Assert that there is enough space left in skip_put_bytes()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mpegvideo_enc: Update the buffer size as more slices are merged
Michael Niedermayer [Mon, 25 May 2015 02:54:41 +0000 (04:54 +0200)]
avcodec/mpegvideo_enc: Update the buffer size as more slices are merged

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size()
Michael Niedermayer [Mon, 25 May 2015 02:53:09 +0000 (04:53 +0200)]
avcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/wavdec: Increase dts packet threshold to fix more misdetections
Rodger Combs [Sat, 23 May 2015 12:07:14 +0000 (14:07 +0200)]
avformat/wavdec: Increase dts packet threshold to fix more misdetections

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/wavdec: Increase probe_packets limit
Michael Niedermayer [Sat, 23 May 2015 10:03:38 +0000 (12:03 +0200)]
avformat/wavdec: Increase probe_packets limit

Fixes DTS detection of b2429e5ba9.dts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agonutdec: abort if EOF is reached in decode_info_header/read_sm_data
Andreas Cadhalpun [Tue, 19 May 2015 22:34:42 +0000 (00:34 +0200)]
nutdec: abort if EOF is reached in decode_info_header/read_sm_data

These loops can take a lot of time if count is very large.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agonutdec: stop skipping bytes at EOF
Andreas Cadhalpun [Tue, 19 May 2015 22:31:24 +0000 (00:31 +0200)]
nutdec: stop skipping bytes at EOF

This can unnecessarily waste a lot of time.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agonutdec: fix infinite resync loops
Andreas Cadhalpun [Tue, 19 May 2015 22:06:05 +0000 (00:06 +0200)]
nutdec: fix infinite resync loops

nut->last_syncpoint_pos doesn't necessarily change between resync
attempts, so find_any_startcode can return the same startcode again.

Thus remember where the last resync happened and don't try to resync
before that.

This can't be done locally in nut_read_packet, because this wouldn't
prevent infinite resync loops, where after the resync a packet is
returned and while reading a following packet the resync happens again.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/nutdec: Check X in 2nd branch of index reading
Michael Niedermayer [Fri, 22 May 2015 22:23:05 +0000 (00:23 +0200)]
avformat/nutdec: Check X in 2nd branch of index reading

Prevents read of uninitialized variable

Based on patch by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ebb0ca3d70465ab6d369a66b2ef43bb059705db8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/nutdec: Fix recovery when immedeately after seeking a failure happens
Michael Niedermayer [Wed, 20 May 2015 15:32:48 +0000 (17:32 +0200)]
avformat/nutdec: Fix recovery when immedeately after seeking a failure happens

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/nutdec: Return error on EOF from get_str()
Michael Niedermayer [Wed, 20 May 2015 15:13:15 +0000 (17:13 +0200)]
avformat/nutdec: Return error on EOF from get_str()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '0069d4597bda5723fbcae410784bbfa4750df706' into release/2.4
Michael Niedermayer [Mon, 1 Jun 2015 02:50:21 +0000 (04:50 +0200)]
Merge commit '0069d4597bda5723fbcae410784bbfa4750df706' into release/2.4

* commit '0069d4597bda5723fbcae410784bbfa4750df706':
  Update changelog for v11.4

Conflicts:
Changelog
RELEASE

Not merged, our changelog differs from this

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoUpdate changelog for v11.4
Reinhard Tartler [Sun, 24 May 2015 08:36:42 +0000 (10:36 +0200)]
Update changelog for v11.4

4 years agoMerge commit '3b69f245dbe6e2016659a45c4bfe284f6c5ac57e' into release/2.4
Michael Niedermayer [Sat, 30 May 2015 22:13:22 +0000 (00:13 +0200)]
Merge commit '3b69f245dbe6e2016659a45c4bfe284f6c5ac57e' into release/2.4

* commit '3b69f245dbe6e2016659a45c4bfe284f6c5ac57e':
  h264: Make sure reinit failures mark the context as not initialized

Conflicts:
libavcodec/h264_slice.c

See: e8714f6f93d1a32f4e4655209960afcf4c185214
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '70642090960c35dcd6da941c869bdf55d4f3bb00' into release/2.4
Michael Niedermayer [Sat, 30 May 2015 21:46:38 +0000 (23:46 +0200)]
Merge commit '70642090960c35dcd6da941c869bdf55d4f3bb00' into release/2.4

* commit '70642090960c35dcd6da941c869bdf55d4f3bb00':
  msrle: Use FFABS to determine the frame size in msrle_decode_pal4

Conflicts:
libavcodec/msrledec.c

See: f7e1367f58263593e6cee3c282f7277d7ee9d553
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoh264: Make sure reinit failures mark the context as not initialized
Luca Barbato [Mon, 25 May 2015 20:30:10 +0000 (22:30 +0200)]
h264: Make sure reinit failures mark the context as not initialized

Bug-Id: CVE-2015-3417
CC: libav-stable@libav.org
4 years agomsrle: Use FFABS to determine the frame size in msrle_decode_pal4
Luca Barbato [Mon, 25 May 2015 19:53:26 +0000 (21:53 +0200)]
msrle: Use FFABS to determine the frame size in msrle_decode_pal4

As done in msrle_decode_8_16_24_32.

Bug-Id: CVE-2015-3395
CC: libav-stable@libav.org
4 years agoMerge commit '4dc0fbb13c33b4e5bdb766652f4daf900ccc952f' into release/2.4
Michael Niedermayer [Thu, 28 May 2015 20:40:35 +0000 (22:40 +0200)]
Merge commit '4dc0fbb13c33b4e5bdb766652f4daf900ccc952f' into release/2.4

* commit '4dc0fbb13c33b4e5bdb766652f4daf900ccc952f':
  x86: cavs: Remove an unneeded scratch buffer

Conflicts:
libavcodec/x86/cavsdsp.c

See: d79f7bf0d63a81ee66026ee92a6946a7303d04bd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/x86/cavsdsp: remove unneeded tmp
Michael Niedermayer [Mon, 16 Mar 2015 13:28:11 +0000 (14:28 +0100)]
avcodec/x86/cavsdsp: remove unneeded tmp

This is faster and simpler as well

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

Conflicts:

libavcodec/x86/cavsdsp.c

4 years agox86: cavs: Remove an unneeded scratch buffer
Michael Niedermayer [Thu, 28 May 2015 10:38:35 +0000 (12:38 +0200)]
x86: cavs: Remove an unneeded scratch buffer

Simplifies the code and makes it build on certain compilers
running out of registers on x86.

CC: libav-stable@libav.org
Reported-By: mudler
(cherry picked from commit e4610300de6869bd6b3b00e76cfeabb6d7653dcd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoMerge commit 'b37bfbfbe53917820d1f97312fa0b2e8c7a15217' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 20:02:26 +0000 (22:02 +0200)]
Merge commit 'b37bfbfbe53917820d1f97312fa0b2e8c7a15217' into release/2.4

* commit 'b37bfbfbe53917820d1f97312fa0b2e8c7a15217':
  configure: Disable i686 for i586 and lower CPUs

See: cdb3eee7c496f763d195de34be7f67783b98fb2c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '5549f693d2181b3211427f65e48eaa2f4fc5a402' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 20:01:43 +0000 (22:01 +0200)]
Merge commit '5549f693d2181b3211427f65e48eaa2f4fc5a402' into release/2.4

* commit '5549f693d2181b3211427f65e48eaa2f4fc5a402':
  mjpegenc: Fix JFIF header byte ordering

Conflicts:
libavcodec/mjpegenc_common.c

See: b19313218c32fa9446d474cbddb11c0776868cd3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '1f64b018cbec018fa66a4a20f79958d9707913de' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 20:01:11 +0000 (22:01 +0200)]
Merge commit '1f64b018cbec018fa66a4a20f79958d9707913de' into release/2.4

* commit '1f64b018cbec018fa66a4a20f79958d9707913de':
  nut: Make sure to clean up on read_header failure

Conflicts:
libavformat/nutdec.c

See: 361702660d2c37a63b7d6381d39e1e1de8405260
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 agoconfigure: Disable i686 for i586 and lower CPUs
Mikulas Patocka [Mon, 15 Sep 2014 12:11:21 +0000 (05:11 -0700)]
configure: Disable i686 for i586 and lower CPUs

4 years agomjpegenc: Fix JFIF header byte ordering
Shiina Hideaki [Thu, 7 May 2015 00:46:55 +0000 (01:46 +0100)]
mjpegenc: Fix JFIF header byte ordering

The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agonut: Make sure to clean up on read_header failure
Luca Barbato [Wed, 29 Apr 2015 19:29:49 +0000 (21:29 +0200)]
nut: Make sure to clean up on read_header failure

Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work.

CC: libav-stable@libav.org
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>