ffmpeg.git
5 years agoupdate for 1.1.8 n1.1.8
Michael Niedermayer [Mon, 13 Jan 2014 14:20:18 +0000 (15:20 +0100)]
update for 1.1.8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Mon, 13 Jan 2014 14:09:10 +0000 (15:09 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  prores: Error out only on surely incomplete ac_coeffs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoprores: Error out only on surely incomplete ac_coeffs
Luca Barbato [Thu, 10 Oct 2013 08:26:31 +0000 (10:26 +0200)]
prores: Error out only on surely incomplete ac_coeffs

(cherry picked from commit 2df7f7714a12a59d31058aba15fb1e348e36b0ab)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Sun, 12 Jan 2014 15:57:57 +0000 (16:57 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  shorten: Fix out-of-array read

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '65830277d2d2ee3658e1f070a61044fff261ed3e' into release/1.1
Michael Niedermayer [Sun, 12 Jan 2014 15:51:26 +0000 (16:51 +0100)]
Merge commit '65830277d2d2ee3658e1f070a61044fff261ed3e' into release/1.1

* commit '65830277d2d2ee3658e1f070a61044fff261ed3e':
  prores: Add a codepath for decoding errors
  nut: Fix unchecked allocations
  avi: directly resync on DV in AVI read failure
  mov: Don't allocate arrays with av_malloc that will be realloced
  shorten: Extend fixed_coeffs to properly support pred_order 0
  Prepare for 9.11 RELEASE
  avi: properly fail if the dv demuxer is missing
  prores: Reject negative run and level values
  audio_mix: fix channel order in mix_1_to_2_fltp_flt_c
  indeo4: Check the inherited quant_mat

Conflicts:
RELEASE
libavcodec/indeo4.c
libavcodec/shorten.c
libavformat/nut.c
libavformat/nutdec.c
libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '0358a099f8abe60230dc2e5bec59bfceb7d1be07' into release/1.1
Michael Niedermayer [Sun, 12 Jan 2014 15:37:42 +0000 (16:37 +0100)]
Merge commit '0358a099f8abe60230dc2e5bec59bfceb7d1be07' into release/1.1

* commit '0358a099f8abe60230dc2e5bec59bfceb7d1be07':
  indeo4: Check the block size if reusing the band configuration
  ffv1: Assume bitdepth 0 means 8bit
  alsa-audio-dec: explicitly cast the delay to a signed int64
  matroskadec: pad EBML_BIN data.
  motionpixels: clip VLC codes.
  avidec: fix a memleak in the dv init code.

Conflicts:
libavcodec/ffv1dec.c
libavcodec/indeo4.c
libavdevice/alsa-audio-dec.c
libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7b337b122959b9bf634c31b549892df974f35b40' into release/1.1
Michael Niedermayer [Sun, 12 Jan 2014 15:16:58 +0000 (16:16 +0100)]
Merge commit '7b337b122959b9bf634c31b549892df974f35b40' into release/1.1

* commit '7b337b122959b9bf634c31b549892df974f35b40':
  truemotion1: make sure index does not go out of bounds
  pcx: round up in bits->bytes conversion in a buffer size check
  omadec: Fix wrong number of array elements
  omadec: check GEOB sizes against buffer size
  ac3dec: fix outptr increment.
  avio: Use AVERROR_PROTOCOL_NOT_FOUND

Conflicts:
libavcodec/ac3dec.c
libavcodec/pcx.c
libavformat/omadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '0e8ae6d10c609bb968c141aa2436413a55852590' into release/1.1
Michael Niedermayer [Sun, 12 Jan 2014 15:01:50 +0000 (16:01 +0100)]
Merge commit '0e8ae6d10c609bb968c141aa2436413a55852590' into release/1.1

* commit '0e8ae6d10c609bb968c141aa2436413a55852590':
  mpegvideo: Drop a faulty assert
  lavr: check that current_buffer is not NULL before using it
  pmpdec: check that there is at least one audio packet.
  lzw: switch to bytestream2
  gifdec: convert to bytestream2

Conflicts:
libavcodec/gifdec.c
libavcodec/lzw.c
libavcodec/lzw.h
libavformat/pmpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'c5c7e3e6f7cf17943c04bd078f260eaf789afbc9' into release/1.1
Michael Niedermayer [Sun, 12 Jan 2014 14:48:39 +0000 (15:48 +0100)]
Merge commit 'c5c7e3e6f7cf17943c04bd078f260eaf789afbc9' into release/1.1

* commit 'c5c7e3e6f7cf17943c04bd078f260eaf789afbc9':
  gifdec: check that the image dimensions are non-zero
  gifdec: return meaningful error codes.
  eacmv: check the framerate before setting it.
  rv30: fix extradata size check.
  sdp: Check that fmt->oformat is non-null before accessing it
  matroskadec: use correct compression parameters for current track CodecPrivate
  vc1: Reset numref if fieldmode is not set

Conflicts:
libavcodec/gifdec.c
libavcodec/rv30.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/msvideo1enc: fix SKIPS_MAX
Michael Niedermayer [Thu, 9 Jan 2014 03:02:58 +0000 (04:02 +0100)]
avcodec/msvideo1enc: fix SKIPS_MAX

Fixes Ticket3270

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

5 years agoUse the h264 parser when decoding VSSH in avi.
Carl Eugen Hoyos [Tue, 7 Jan 2014 21:49:05 +0000 (22:49 +0100)]
Use the h264 parser when decoding VSSH in avi.

Fixes ticket #3261 visually.

Analyzed-by: Michael Doilnitsyn
(cherry picked from commit 94cf4f8bac12c58e30ce3b5d72cf5898baafe9a8)

Conflicts:
libavformat/avidec.c

5 years agoavformat/mxfdec: detect loops during header parsing
Michael Niedermayer [Wed, 8 Jan 2014 03:49:50 +0000 (04:49 +0100)]
avformat/mxfdec: detect loops during header parsing

The header parser uses forward and backward parsing, making the
bulletproof prevention of loops difficult, thus this simple
detection code.
If someone improves the forward/backward parsing so it cannot loop
then this commit should be reverted

Fixes Ticket3278

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

5 years agoavformat/oggdec: dont read timestamps from EOS pages of ogm videos
Michael Niedermayer [Sat, 4 Jan 2014 16:33:59 +0000 (17:33 +0100)]
avformat/oggdec: dont read timestamps from EOS pages of ogm videos

Some muxers store invalid timestamps there, which breaks seeking
Fixes Ticket2739

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

5 years agoshorten: Fix out-of-array read
Tim Walker [Wed, 9 Oct 2013 09:47:04 +0000 (11:47 +0200)]
shorten: Fix out-of-array read

pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 5f5ada3dbf97e306a74250ba8dcf8619ad59b020)
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
5 years agoprores: Add a codepath for decoding errors
Luca Barbato [Thu, 10 Oct 2013 06:40:39 +0000 (08:40 +0200)]
prores: Add a codepath for decoding errors

(cherry picked from commit 44690dfa683f620c77e9f0e8e9bc5682608636b1)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
5 years agonut: Fix unchecked allocations
Derek Buitenhuis [Tue, 22 Oct 2013 15:11:11 +0000 (16:11 +0100)]
nut: Fix unchecked allocations

CC: libav-stable@libav.org
(cherry picked from commit b1fcdc08ceb5df69fac34aa0d57c56905d32b8b4)
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
5 years agoavi: directly resync on DV in AVI read failure
Luca Barbato [Tue, 6 Aug 2013 01:52:48 +0000 (03:52 +0200)]
avi: directly resync on DV in AVI read failure

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit ceec6e792e4b5baaa23b220f4fd33417631f5288)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agomov: Don't allocate arrays with av_malloc that will be realloced
Martin Storsjö [Fri, 4 Oct 2013 06:52:02 +0000 (09:52 +0300)]
mov: Don't allocate arrays with av_malloc that will be realloced

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit b698542ad83284fbb8c22404e3cafeb2dd739d38)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoshorten: Extend fixed_coeffs to properly support pred_order 0
Luca Barbato [Wed, 4 Sep 2013 17:26:36 +0000 (19:26 +0200)]
shorten: Extend fixed_coeffs to properly support pred_order 0

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit b2148faca9e9e553c14b27844b56e367c85a777e)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoPrepare for 9.11 RELEASE
Reinhard Tartler [Sun, 5 Jan 2014 22:23:12 +0000 (17:23 -0500)]
Prepare for 9.11 RELEASE

5 years agoavi: properly fail if the dv demuxer is missing
Luca Barbato [Mon, 5 Aug 2013 23:39:07 +0000 (01:39 +0200)]
avi: properly fail if the dv demuxer is missing

CC: libav-stable@libav.org
(cherry picked from commit 1cac9accbd1f9b8596122d0735e37b97a844c514)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoprores: Reject negative run and level values
Luca Barbato [Thu, 10 Oct 2013 19:02:10 +0000 (21:02 +0200)]
prores: Reject negative run and level values

Sample-Id: 00000611-google

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit c0de9a23c7080e2fac8f879b9d9a0ce2b64ea953)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoaudio_mix: fix channel order in mix_1_to_2_fltp_flt_c
Anton Khirnov [Wed, 2 Oct 2013 14:40:02 +0000 (16:40 +0200)]
audio_mix: fix channel order in mix_1_to_2_fltp_flt_c

CC:libav-stable@libav.org
(cherry picked from commit df6737a55f5dc7c0ae5272bc5fa6182836d5481c)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoindeo4: Check the inherited quant_mat
Luca Barbato [Fri, 11 Oct 2013 09:34:03 +0000 (11:34 +0200)]
indeo4: Check the inherited quant_mat

Invalidate it if not supported.

Sample-Id: 00000262-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit c9ef6b09326a24010bf86d6b0d19cfa42df4d546)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/indeo4.c

5 years agoindeo4: Check the block size if reusing the band configuration
Luca Barbato [Fri, 11 Oct 2013 08:51:53 +0000 (10:51 +0200)]
indeo4: Check the block size if reusing the band configuration

Sample-Id: 00000287-google

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 0cb83c563848bf8f8365e7bd30e7e6b57ef360f0)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoffv1: Assume bitdepth 0 means 8bit
Luca Barbato [Sun, 13 Oct 2013 13:34:47 +0000 (15:34 +0200)]
ffv1: Assume bitdepth 0 means 8bit

CC: libav-stable@libav.org
Reported-by: debian/726189
(cherry picked from commit a90905db2e6ab1840890f3a88bfd3bf008b9d886)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoalsa-audio-dec: explicitly cast the delay to a signed int64
Anton Khirnov [Sun, 1 Dec 2013 08:27:01 +0000 (09:27 +0100)]
alsa-audio-dec: explicitly cast the delay to a signed int64

Otherwise the expression will be evaluated as unsigned, which will break
when the result should be negative.
CC:libav-stable@libav.org

(cherry picked from commit 089fac77a6bf9199a5ec161e9c27850f0a680541)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agomatroskadec: pad EBML_BIN data.
Anton Khirnov [Fri, 15 Nov 2013 09:15:24 +0000 (10:15 +0100)]
matroskadec: pad EBML_BIN data.

It might be passed to code requiring padding, such as lzo decompression.

Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

(cherry picked from commit 30be1ea33e5525266ad871bed60b1893a53caeaf)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agomotionpixels: clip VLC codes.
Anton Khirnov [Fri, 15 Nov 2013 14:33:20 +0000 (15:33 +0100)]
motionpixels: clip VLC codes.

Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

(cherry picked from commit ca41c72c6d9515d9045bd3b68104525dee81b8d0)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoavidec: fix a memleak in the dv init code.
Anton Khirnov [Fri, 15 Nov 2013 18:06:23 +0000 (19:06 +0100)]
avidec: fix a memleak in the dv init code.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit ce9bba5340a5fb6f38974a19af019dd6aa2da035)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agotruemotion1: make sure index does not go out of bounds
Anton Khirnov [Fri, 15 Nov 2013 18:06:23 +0000 (19:06 +0100)]
truemotion1: make sure index does not go out of bounds

Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

(cherry picked from commit c918e08b9cc9ce8d06159c51da55ec5ab018039a)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agopcx: round up in bits->bytes conversion in a buffer size check
Anton Khirnov [Fri, 15 Nov 2013 18:06:23 +0000 (19:06 +0100)]
pcx: round up in bits->bytes conversion in a buffer size check

Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

(cherry picked from commit 430d12196432ded13f011a3bf7690f03c9b2e5d6)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoomadec: Fix wrong number of array elements
Michael Niedermayer [Thu, 24 Oct 2013 13:24:24 +0000 (15:24 +0200)]
omadec: Fix wrong number of array elements

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
CC:libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 97f50e92b5cf3b47a76f75d76ed4340e822030db)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoomadec: check GEOB sizes against buffer size
Michael Niedermayer [Thu, 24 Oct 2013 13:24:25 +0000 (15:24 +0200)]
omadec: check GEOB sizes against buffer size

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
CC:libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 1c736bedd9891501960ebac0f7c05eb60225e947)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoac3dec: fix outptr increment.
Michael Niedermayer [Fri, 25 Oct 2013 22:46:53 +0000 (18:46 -0400)]
ac3dec: fix outptr increment.

Fixes corrupt data errors when downmixing in the AC-3 decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
(cherry picked from commit 6c82c87dbbc0582658968eae46cfebeea90a9c5e)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoavio: Use AVERROR_PROTOCOL_NOT_FOUND
Luca Barbato [Sun, 20 Oct 2013 20:01:54 +0000 (22:01 +0200)]
avio: Use AVERROR_PROTOCOL_NOT_FOUND

When the protocol is missing ffurl_alloc() should return
AVERROR_PROTOCOL_NOT_FOUND instead of AVERROR(ENOENT).

Bug-Id: 577
CC: libav-stable@libav.org
(cherry picked from commit ea71aafd6881d7ce5cffec56feb45488e3ac5221)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agompegvideo: Drop a faulty assert
Luca Barbato [Tue, 22 Oct 2013 17:17:10 +0000 (19:17 +0200)]
mpegvideo: Drop a faulty assert

That check is easily reachable by faulty input.

CC:libav-stable@libav.org
Reported-by: Torsten Sadowski <tsadowski@gmx.net>
(cherry picked from commit 72072bf9de3241848ea86f68d2297b7a5d6ad49b)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agolavr: check that current_buffer is not NULL before using it
Justin Ruggles [Sun, 27 Oct 2013 19:00:36 +0000 (15:00 -0400)]
lavr: check that current_buffer is not NULL before using it

Fixes a segfault during resampling when compiled with -DDEBUG.
Fixes all fate-lavr-resample tests with -DDEBUG.

CC:libav-stable@libav.org
(cherry picked from commit 211ca69b13eb0a127a9ef7e70ddaccdab125d1c5)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agopmpdec: check that there is at least one audio packet.
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
pmpdec: check that there is at least one audio packet.

The code cannot handle there being none, but that should not happen for
valid files.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 1b5d065ca722eb8028c7a08e054b6da3419faf5d)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agolzw: switch to bytestream2
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
lzw: switch to bytestream2

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit e89aa4bf56e5b5c45f569eb12733519789e057da)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agogifdec: convert to bytestream2
Anton Khirnov [Fri, 15 Nov 2013 09:23:04 +0000 (10:23 +0100)]
gifdec: convert to bytestream2

(cherry picked from commit 1f3e56b6dcc163a705704e98569d4850a31d651c)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agogifdec: check that the image dimensions are non-zero
Anton Khirnov [Fri, 15 Nov 2013 09:15:24 +0000 (10:15 +0100)]
gifdec: check that the image dimensions are non-zero

Also add an error message an return a more suitable error code
(INVALIDDATA, not EINVAL);
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

(cherry picked from commit c453723ad7d14abc5e82677eebaa6025fa598f08)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agogifdec: return meaningful error codes.
Anton Khirnov [Mon, 19 Nov 2012 09:30:01 +0000 (10:30 +0100)]
gifdec: return meaningful error codes.

(cherry picked from commit 048ffb9bb26f30f1995400b8cd3809221ba03441)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoeacmv: check the framerate before setting it.
Anton Khirnov [Thu, 12 Dec 2013 06:31:26 +0000 (07:31 +0100)]
eacmv: check the framerate before setting it.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit 24057c83207d6ea8bfd824155ac37be8a33dfd0c)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/eacmv.c

5 years agorv30: fix extradata size check.
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
rv30: fix extradata size check.

It has been checking the number of bits in the offset instead of the
actual offset.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
(cherry picked from commit a6a2282c25abe43e352010a7c3fbc92994c0bc1c)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agosdp: Check that fmt->oformat is non-null before accessing it
Martin Storsjö [Fri, 3 Jan 2014 13:47:02 +0000 (15:47 +0200)]
sdp: Check that fmt->oformat is non-null before accessing it

This avoids crashes when avserver tries to create an SDP, since
d77f4af.

Addresses: CVE-2012-6617

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 82b9799bb211ecd117171115e4a8b832c4942314)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agomatroskadec: use correct compression parameters for current track CodecPrivate
Aurelien Jacobs [Sun, 21 Aug 2011 14:03:13 +0000 (16:03 +0200)]
matroskadec: use correct compression parameters for current track CodecPrivate

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8b516f154a0a08655cec2d13d12aadc58cae0b1c)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agovc1: Reset numref if fieldmode is not set
Kostya Shishkov [Mon, 25 Nov 2013 13:04:41 +0000 (14:04 +0100)]
vc1: Reset numref if fieldmode is not set

There are samples in the wild with B-frames and P-frames with different
interlace mode.

CC: libav-stable@libav.org
Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit de44dfc7c0ec02bda7d846ef713145c890bfae3f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agonutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard...
Michael Niedermayer [Sun, 22 Dec 2013 17:47:28 +0000 (18:47 +0100)]
nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd

This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197

An alternative would be to fail hard in this case and refuse to mux such data.

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

5 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Sat, 21 Dec 2013 01:43:44 +0000 (02:43 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  arm: Don't clobber callee saved registers in scalarproduct
  alsdec: check block length
  h264/mpegvideo: do not provide pixel formats for hwaccels that are not compiled in
  mpeg4video_parser: init mpeg4 static tables.

Conflicts:
libavcodec/mpeg4video_parser.c
libavcodec/mpeg4videodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '56eded8bc7bccdf14245bae3a45b0fecf9d9d122' into release/1.1
Michael Niedermayer [Sat, 21 Dec 2013 01:28:44 +0000 (02:28 +0100)]
Merge commit '56eded8bc7bccdf14245bae3a45b0fecf9d9d122' into release/1.1

* commit '56eded8bc7bccdf14245bae3a45b0fecf9d9d122':
  mpeg4videodec: split initializing static tables into a separate function
  x86: ac3dsp: Remove 3dnow version of ff_ac3_extract_exponents
  pthread: Avoid spurious wakeups

Conflicts:
libavcodec/mpeg4videodec.c
tests/fate/ac3.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '1a5a6ac01b0ad2cf3d2128372ea41f3c1cfc2d3f' into release/1.1
Michael Niedermayer [Sat, 21 Dec 2013 01:14:24 +0000 (02:14 +0100)]
Merge commit '1a5a6ac01b0ad2cf3d2128372ea41f3c1cfc2d3f' into release/1.1

* commit '1a5a6ac01b0ad2cf3d2128372ea41f3c1cfc2d3f':
  pthread: Fix deadlock during thread initialization

Conflicts:
libavcodec/pthread.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavfilter/ff_insert_pad: fix order of operations
Michael Niedermayer [Mon, 21 Oct 2013 14:21:14 +0000 (16:21 +0200)]
avfilter/ff_insert_pad: fix order of operations

Fixes out of bounds access
Fixes CID732170
Fixes CID732169

No filter is known to use this function in a way so the issue can be reproduced.

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

Conflicts:

libavfilter/avfilter.c
(cherry picked from commit 86591b244f3a27293153896813f5569b49b2f5c0)

Conflicts:

libavfilter/avfilter.c
(cherry picked from commit 400c4f8fa3fd58951dc3f356b2b00484e3363694)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoarm: Don't clobber callee saved registers in scalarproduct
Martin Storsjö [Fri, 20 Dec 2013 13:02:35 +0000 (15:02 +0200)]
arm: Don't clobber callee saved registers in scalarproduct

q4-q7/d8-d15 are supposed to not be clobbered by the callee.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d307e408d4a9ada22df443cc38be77cc5e492694)

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoalsdec: check block length
Reinhard Tartler [Sun, 8 Dec 2013 18:24:26 +0000 (13:24 -0500)]
alsdec: check block length

Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Addresses: CVE-2013-0845
(cherry picked from commit 2a0fb7286d67c47e44aa76c237ede117b22af616)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
5 years agoavcodec/cabac: force get_cabac to be not inlined
Michael Niedermayer [Thu, 5 Dec 2013 00:41:10 +0000 (01:41 +0100)]
avcodec/cabac: force get_cabac to be not inlined

works around bug in gccs inline asm register assignment
Fixes Ticket3177

gcc from 4.4 to 4.6 is affected at least, no non affected gccs known
clang seems not affected

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

5 years agoh264/mpegvideo: do not provide pixel formats for hwaccels that are not compiled in
Anton Khirnov [Fri, 29 Nov 2013 12:18:29 +0000 (13:18 +0100)]
h264/mpegvideo: do not provide pixel formats for hwaccels that are not compiled in

5 years agompeg4video_parser: init mpeg4 static tables.
Anton Khirnov [Fri, 15 Nov 2013 21:13:46 +0000 (22:13 +0100)]
mpeg4video_parser: init mpeg4 static tables.

They are used when decoding the frame header.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agompeg4videodec: split initializing static tables into a separate function
Anton Khirnov [Fri, 15 Nov 2013 21:13:45 +0000 (22:13 +0100)]
mpeg4videodec: split initializing static tables into a separate function

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agoavformat/utils: dont count attached pics toward the probesize
Michael Niedermayer [Mon, 18 Nov 2013 02:02:36 +0000 (03:02 +0100)]
avformat/utils: dont count attached pics toward the probesize

Such pics behave more like headers which we also dont count.
Fixes Ticket3146

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

5 years agobuild: avoid stdin stall with GNU AS probing.
Clément Bœsch [Fri, 8 Nov 2013 22:55:06 +0000 (23:55 +0100)]
build: avoid stdin stall with GNU AS probing.

a758c5e added probing for various tools, such as AS. Unfortunately, GNU
AS is reading stdin with -v, and thus configure is stalled with
configure arguments such as --as=as.

Fixes Ticket #1898.
(cherry picked from commit dbb41f93c16cbc65a899a75723c95da51c851cd5)

5 years agox86: ac3dsp: Remove 3dnow version of ff_ac3_extract_exponents
Diego Biurrun [Fri, 26 Apr 2013 14:48:39 +0000 (16:48 +0200)]
x86: ac3dsp: Remove 3dnow version of ff_ac3_extract_exponents

The function requires increasing the fuzz factor for the ac3/eac3 encode
tests and even so makes fate fail. It only provides a slight encoding
speedup for legacy CPUs that do not support SSE2. Thus its benefit is not
worth the trouble it creates and fixing it would be a waste of time.

5 years agoavformat/utils: do not override pts in h264 when they are provided from the demuxer
Michael Niedermayer [Sat, 26 Oct 2013 23:03:19 +0000 (01:03 +0200)]
avformat/utils: do not override pts in h264 when they are provided from the demuxer

Fixes Ticket2143

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

5 years agoh264: make flush_change() set mmco_reset
Michael Niedermayer [Fri, 25 Oct 2013 23:22:38 +0000 (01:22 +0200)]
h264: make flush_change() set mmco_reset

This ensures that frames do not get mixed on context reinits

Fixes Ticket2836

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

5 years agoavcodec/h264: reduce noisiness of "mmco: unref short failure"
Michael Niedermayer [Fri, 25 Oct 2013 18:03:29 +0000 (20:03 +0200)]
avcodec/h264: reduce noisiness of "mmco: unref short failure"

Do not consider it an error if we have no frames and should discard one.
This condition can easily happen when decoding is started from an I frame

Fixes Ticket2811

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

Conflicts:
libavcodec/h264_refs.c

5 years agoavformat/mp3dec: perform seek resync in the correct direction
Michael Niedermayer [Fri, 25 Oct 2013 17:35:55 +0000 (19:35 +0200)]
avformat/mp3dec: perform seek resync in the correct direction

Fixes seeking to the last frame in CBR files
Fixes Ticket2773

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

5 years agoavcodec/h264: do not trust last_pic_droppable when marking pictures as done
Michael Niedermayer [Thu, 24 Oct 2013 21:11:41 +0000 (23:11 +0200)]
avcodec/h264: do not trust last_pic_droppable when marking pictures as done

This simplifies the code and fixes a deadlock

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

Conflicts:
libavcodec/h264.c

5 years agoavformat/mov: force parsing of headers if stts is absent
Michael Niedermayer [Fri, 4 Oct 2013 15:39:19 +0000 (17:39 +0200)]
avformat/mov: force parsing of headers if stts is absent

Fixes Ticket2991

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

5 years agoavcodec/h264_refs: modify key frame detection heuristic to detect more cases
Michael Niedermayer [Wed, 9 Oct 2013 21:52:54 +0000 (23:52 +0200)]
avcodec/h264_refs: modify key frame detection heuristic to detect more cases

Fixes Ticket2968

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

Conflicts:
libavcodec/h264_refs.c

5 years agoavformat/matroskadec: only set r_frame_rate if the value is within reasonable limits
Michael Niedermayer [Sat, 5 Oct 2013 22:07:28 +0000 (00:07 +0200)]
avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits

Fixes Ticket2451

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

5 years agoavformat/wavdec: Dont trust the fact chunk for PCM
Michael Niedermayer [Wed, 9 Oct 2013 19:43:06 +0000 (21:43 +0200)]
avformat/wavdec: Dont trust the fact chunk for PCM

Fixes Ticket3033

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

Conflicts:
libavformat/wavdec.c

5 years agopthread: Avoid spurious wakeups
Ben Jackson [Fri, 18 Oct 2013 14:28:50 +0000 (15:28 +0100)]
pthread: Avoid spurious wakeups

pthread_wait_cond can wake up unexpectedly (Wikipedia: Spurious_wakeup).

The FF_THREAD_SLICE thread mechanism could spontaneously execute
jobs or allow the caller of avctx->execute to return before all
jobs were complete.

Test both cases to ensure the wakeup is real.

Signed-off-by: Ben Jackson <ben@ben.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agopthread: Fix deadlock during thread initialization
Derek Buitenhuis [Thu, 10 Oct 2013 15:05:40 +0000 (11:05 -0400)]
pthread: Fix deadlock during thread initialization

Sometimes, if pthread_create() failed, then pthread_cond_wait() could
accidentally be called in the worker threads after the uninit function
had already called pthread_cond_broadcast(), leading to a deadlock.

Don't call pthread_cond_wait() if c->done is set.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
5 years agoupdate for 1.1.7 n1.1.7
Michael Niedermayer [Fri, 11 Oct 2013 13:39:23 +0000 (15:39 +0200)]
update for 1.1.7

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/parser: reset indexes on realloc failure
Michael Niedermayer [Thu, 26 Sep 2013 19:03:48 +0000 (21:03 +0200)]
avcodec/parser: reset indexes on realloc failure

Fixes Ticket2982

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ffv1enc: update buffer check for 16bps
Michael Niedermayer [Mon, 9 Sep 2013 15:58:18 +0000 (17:58 +0200)]
avcodec/ffv1enc: update buffer check for 16bps

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'TimothyGu/release/1.1' into release/1.1
Michael Niedermayer [Fri, 11 Oct 2013 13:28:03 +0000 (15:28 +0200)]
Merge remote-tracking branch 'TimothyGu/release/1.1' into release/1.1

* TimothyGu/release/1.1:
  doc/encoders: add doc for AAC encoder
  doc/ffmpeg-formats: Add documentation for 2 parameters that have been missing
  doc/encoders: improve libvo-aacenc doc
  doc/encoders: Remove options that were not there when branch was cut from master
  doc/encoders: reformat and add some clarification in libtwolame doc
  doc/encoders: reformat libmp3lame doc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoDelete changelog
Michael Niedermayer [Fri, 11 Oct 2013 12:49:50 +0000 (14:49 +0200)]
Delete changelog

The merges have filled the changelog of the 1.1 branch with bugfix
entries that ffmpeg 1.1 was never affected by or that where fixed
long ago.
No one has cleaned this mess up and its better to have no changelog file
than one that is 80% wrong.
If someone wants to clean this up, thats of course very welcome, aka yes
patches and pull requests welcome!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Fri, 11 Oct 2013 11:05:31 +0000 (13:05 +0200)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  Fix top-level description
  update Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoFix top-level description
Reinhard Tartler [Thu, 10 Oct 2013 13:56:40 +0000 (09:56 -0400)]
Fix top-level description

5 years agoupdate Changelog
Reinhard Tartler [Thu, 10 Oct 2013 12:50:09 +0000 (08:50 -0400)]
update Changelog

5 years agoffserver: strip odd chars from html error messages before sending them back
Michael Niedermayer [Tue, 8 Oct 2013 22:30:46 +0000 (00:30 +0200)]
ffserver: strip odd chars from html error messages before sending them back

Fixes Ticket3034

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Tue, 8 Oct 2013 00:11:31 +0000 (02:11 +0200)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  Prepare for 9.10 RELEASE
  h263dec: Remove a hack that can cause infinite loops
  mpegvideo: Initialize chroma_*_shift and codec_tag even if the size is 0
  vc1dec: Don't decode slices when the latest slice header failed to decode

Conflicts:
RELEASE
libavcodec/h263dec.c
libavcodec/mpegvideo.c
libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '494f2d4f9e834db1eaf1a7d0160d497f9802013d' into release/1.1
Michael Niedermayer [Mon, 7 Oct 2013 23:56:25 +0000 (01:56 +0200)]
Merge commit '494f2d4f9e834db1eaf1a7d0160d497f9802013d' into release/1.1

* commit '494f2d4f9e834db1eaf1a7d0160d497f9802013d':
  vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks
  r3d: Add more input value validation
  fraps: Make the input buffer size checks more strict
  svq3: Avoid a division by zero
  rmdec: Validate the fps value
  twinvqdec: Check the ibps parameter separately
  asfdec: Check the return value of asf_read_stream_properties
  mxfdec: set audio timebase to 1/samplerate

Conflicts:
libavcodec/fraps.c
libavcodec/svq3.c
libavformat/mxfdec.c
tests/ref/fate/mxf-demux
tests/ref/seek/lavf-mxf
tests/ref/seek/lavf-mxf_d10

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7e350b7ddd19af856b55634233d609e29baab646' into release/1.1
Michael Niedermayer [Mon, 7 Oct 2013 23:41:20 +0000 (01:41 +0200)]
Merge commit '7e350b7ddd19af856b55634233d609e29baab646' into release/1.1

* commit '7e350b7ddd19af856b55634233d609e29baab646':
  pcx: Check the packet size before assuming it fits a palette
  rpza: Fix a buffer size check
  xxan: Disallow odd width
  xan: Only read within the data that actually was initialized
  xan: Use bytestream2 to limit reading to within the buffer
  pcx: Consume the whole packet if giving up due to missing palette
  pngdec: Stop trying to decode once inflate returns Z_STREAM_END
  mov: Make sure the read sample count is nonnegative
  bfi: Add some very basic sanity checks for input packet sizes
  bfi: Avoid divisions by zero
  electronicarts: Add more sanity checking for the number of channels
  riffdec: Add sanity checks for the sample rate

Conflicts:
libavcodec/pcx.c
libavcodec/xan.c
libavformat/mov.c
libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '04d2f9ace3fb6e880f3488770fc5a39de5b63cbb' into release/1.1
Michael Niedermayer [Mon, 7 Oct 2013 23:26:51 +0000 (01:26 +0200)]
Merge commit '04d2f9ace3fb6e880f3488770fc5a39de5b63cbb' into release/1.1

* commit '04d2f9ace3fb6e880f3488770fc5a39de5b63cbb':
  mvi: Add sanity checking for the audio frame size
  alac: Do bounds checking of lpc_order read from the bitstream
  xwma: Avoid division by zero
  avidec: Make sure a packet is large enough before reading its data
  vqf: Make sure the bitrate is in the valid range
  vqf: Make sure sample_rate is set to a valid value
  electronicarts: Check packet sizes before reading
  lavf: Avoid setting avg_frame_rate if delta_dts is negative
  vc1dec: Undo mpegvideo initialization if unable to allocate tables
  vc1dec: Fix leaks in ff_vc1_decode_init_alloc_tables on errors
  wnv1: Make sure the input packet is large enough
  dcadec: Validate the lfe parameter

Conflicts:
libavcodec/dcadec.c
libavcodec/wnv1.c
libavformat/avidec.c
libavformat/electronicarts.c
libavformat/utils.c
libavformat/xwma.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'ce1dacb435460dda1f9d453eaaeac44bd502aca4' into release/1.1
Michael Niedermayer [Mon, 7 Oct 2013 23:06:45 +0000 (01:06 +0200)]
Merge commit 'ce1dacb435460dda1f9d453eaaeac44bd502aca4' into release/1.1

* commit 'ce1dacb435460dda1f9d453eaaeac44bd502aca4':
  rl2: Avoid a division by zero
  wtv: Add more sanity checks for a length read from the file
  segafilm: Validate the number of audio channels
  qpeg: Add checks for running out of rows in qpeg_decode_inter
  mpegaudiodec: Validate that the number of channels fits at the given offset
  asvdec: Verify the amount of extradata
  idroqdec: Make sure a video stream has been allocated before returning packets
  rv10: Validate the dimensions set from the container
  xmv: Add more sanity checks for parameters read from the bitstream
  ffv1: Make sure at least one slice context is initialized
  truemotion2: Use av_freep properly in an error path
  eacmv: Make sure a reference frame exists before referencing it
  mpeg4videodec: Check the width/height in mpeg4_decode_sprite_trajectory
  ivi_common: Make sure color planes have been initialized
  mov: Don't use a negative duration for setting other fields

Conflicts:
libavcodec/eacmv.c
libavcodec/ffv1.c
libavcodec/mpeg4videodec.c
libavcodec/mpegaudiodec.c
libavcodec/qpeg.c
libavformat/mov.c
libavformat/wtv.c
libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '163196562fe744149ef599d754c30c08a9898381' into release/1.1
Michael Niedermayer [Mon, 7 Oct 2013 22:49:18 +0000 (00:49 +0200)]
Merge commit '163196562fe744149ef599d754c30c08a9898381' into release/1.1

* commit '163196562fe744149ef599d754c30c08a9898381':
  oggparseogm: Convert to use bytestream2
  rv34: Check the return value from ff_rv34_decode_init
  matroskadec: Verify realaudio codec parameters
  mace: Make sure that the channel count is set to a valid value
  svq3: Check for any negative return value from ff_h264_check_intra_pred_mode
  vp3: Check the framerate for validity
  cavsdec: Make sure a sequence header has been decoded before decoding pictures
  vocdec: Don't update codec parameters mid-stream
  sierravmd: Do sanity checking of frame sizes
  omadec: Properly check lengths before incrementing the position
  mpc8: Make sure the first stream exists before parsing the seek table

Conflicts:
libavcodec/mace.c
libavformat/oggparseogm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'f8a72f041c049e812dfa1f32156327e9778f5710' into release/1.1
Michael Niedermayer [Mon, 7 Oct 2013 22:24:54 +0000 (00:24 +0200)]
Merge commit 'f8a72f041c049e812dfa1f32156327e9778f5710' into release/1.1

* commit 'f8a72f041c049e812dfa1f32156327e9778f5710':
  mpc8: Check the seek table size parsed from the bitstream
  zmbvdec: Check the buffer size for uncompressed data
  ape: Don't allow the seektable to be omitted
  shorten: Break out of loop looking for fmt chunk if none is found
  shorten: Use a checked bytestream reader for the wave header
  smacker: Make sure we don't fill in huffman codes out of range
  smacker: Avoid integer overflow when allocating packets
  smacker: Don't return packets in unallocated streams
  dsicin: Add some basic sanity checks for fields read from the file

Conflicts:
libavcodec/shorten.c
libavcodec/smacker.c
libavcodec/zmbv.c
libavformat/mpc8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoPrepare for 9.10 RELEASE
Reinhard Tartler [Fri, 4 Oct 2013 23:14:27 +0000 (19:14 -0400)]
Prepare for 9.10 RELEASE

5 years agoh263dec: Remove a hack that can cause infinite loops
Martin Storsjö [Mon, 23 Sep 2013 09:25:48 +0000 (12:25 +0300)]
h263dec: Remove a hack that can cause infinite loops

The actual usefulness of the hack is not known, and it does cause
infinite loops with some broken input files.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 8812a8057f539845f6801cafdf6c481a59e96b48)

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agompegvideo: Initialize chroma_*_shift and codec_tag even if the size is 0
Martin Storsjö [Tue, 24 Sep 2013 09:02:39 +0000 (12:02 +0300)]
mpegvideo: Initialize chroma_*_shift and codec_tag even if the size is 0

This fixes breakage in a few fate tests on certain setups
(that for some reason didn't break on OS X) after the previous
commit (8812a8057). Currently, some video streams are initialized
in ff_MPV_common_init with width/height set at 0 and only changed
to a proper video size with ff_MPV_common_frame_size_change later.

The breakage was diagnosed by Anton Khirnov.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5f24fe82e5fcf227abb5ebf62aa9bc246fda8c0d)

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agovc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks
Martin Storsjö [Fri, 20 Sep 2013 08:32:25 +0000 (11:32 +0300)]
vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5e25fdbfe01635cfc650ac4adc27d434b2df0d64)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/vc1dec.c

5 years agovc1dec: Don't decode slices when the latest slice header failed to decode
Michael Niedermayer [Tue, 19 Feb 2013 20:40:09 +0000 (21:40 +0100)]
vc1dec: Don't decode slices when the latest slice header failed to decode

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Conflicts:
libavcodec/vc1dec.c

5 years agor3d: Add more input value validation
Martin Storsjö [Thu, 19 Sep 2013 14:02:36 +0000 (17:02 +0300)]
r3d: Add more input value validation

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Conflicts:
libavformat/r3d.c

5 years agofraps: Make the input buffer size checks more strict
Martin Storsjö [Thu, 19 Sep 2013 13:29:23 +0000 (16:29 +0300)]
fraps: Make the input buffer size checks more strict

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Conflicts:
libavcodec/fraps.c

5 years agosvq3: Avoid a division by zero
Martin Storsjö [Thu, 19 Sep 2013 12:58:59 +0000 (15:58 +0300)]
svq3: Avoid a division by zero

If the height is zero, the decompression will probably end up
failing due to not fitting into the allocated buffer later
anyway, so this doesn't need any more elaborate check.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 601c2015bc16f0b281160292a6a760cbbbb0eacb)

5 years agormdec: Validate the fps value
Martin Storsjö [Mon, 16 Sep 2013 17:58:38 +0000 (20:58 +0300)]
rmdec: Validate the fps value

Abort if it is invalid if strict error checking has been requested.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 0f310a6f333b016d336674d086045e8473fdf918)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavformat/rmdec.c

5 years agotwinvqdec: Check the ibps parameter separately
Martin Storsjö [Tue, 17 Sep 2013 16:33:48 +0000 (19:33 +0300)]
twinvqdec: Check the ibps parameter separately

This is required, since invalid parameters actually could
pass the switch check below.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit c77d409bf95954aceb762dd800d1ee2868c4b0d4)

5 years agopcx: Check the packet size before assuming it fits a palette
Martin Storsjö [Sun, 29 Sep 2013 10:02:27 +0000 (13:02 +0300)]
pcx: Check the packet size before assuming it fits a palette

This fixes reads out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d1d99e3befea5d411ac3aae72dbdecce94f8b547)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/pcx.c