ffmpeg.git
6 years agoMAINTAINERS: mention that people are welcome to pick up and maintain older releases n1.1.4
Michael Niedermayer [Thu, 14 Mar 2013 13:50:42 +0000 (14:50 +0100)]
MAINTAINERS: mention that people are welcome to pick up and maintain older releases

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMAINTAINERS: update for 1.2
Michael Niedermayer [Fri, 8 Mar 2013 13:45:26 +0000 (14:45 +0100)]
MAINTAINERS: update for 1.2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agodnxhddec: return the correct number of bytes from decode_frame
Michael Niedermayer [Mon, 4 Mar 2013 17:17:47 +0000 (18:17 +0100)]
dnxhddec: return the correct number of bytes from decode_frame

Fixes Ticket2022

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agodpxenc: fix data offset
ArnoB [Thu, 14 Mar 2013 17:35:55 +0000 (18:35 +0100)]
dpxenc: fix data offset

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

Conflicts:

tests/ref/lavf/dpx

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agormdec: flush audio packet on seeking
Michael Niedermayer [Sun, 17 Mar 2013 23:00:02 +0000 (00:00 +0100)]
rmdec: flush audio packet on seeking

Fixes Ticket1605

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Mon, 18 Mar 2013 02:11:58 +0000 (03:11 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  hqdn3d: Fix out of array read in LOWPASS
  vf_gradfun: fix uninitialized variable use

Conflicts:
libavfilter/vf_hqdn3d.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'c50241080d7599c90fc8b4e74c5f8d62a4caae52' into release/1.1
Michael Niedermayer [Mon, 18 Mar 2013 01:54:35 +0000 (02:54 +0100)]
Merge commit 'c50241080d7599c90fc8b4e74c5f8d62a4caae52' into release/1.1

* commit 'c50241080d7599c90fc8b4e74c5f8d62a4caae52':
  vf_hqdn3d: fix uninitialized variable use
  lzo: fix overflow checking in copy_backptr()
  flacdec: simplify bounds checking in flac_probe()
  atrac3: avoid oversized shifting in decode_bytes()
  shorten: use the unsigned type where needed
  shorten: report meaningful errors
  shorten: K&R formatting cosmetics
  shorten: set invalid channels count to 0

Conflicts:
libavcodec/shorten.c
libavformat/flacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoDo not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.
Carl Eugen Hoyos [Sat, 16 Mar 2013 19:13:44 +0000 (20:13 +0100)]
Do not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.

Reconfiguring can break x264 lossless encoding.

Fixes ticket #2165.
(cherry picked from commit 75c7e4583f4fd727d236a12763a265502fe00988)

6 years agohqdn3d: Fix out of array read in LOWPASS
Loren Merritt [Fri, 21 Sep 2012 23:43:16 +0000 (01:43 +0200)]
hqdn3d: Fix out of array read in LOWPASS

CC:libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 5b3c1aecb253828d09fa9825c5a4aed97badf086)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agovf_hqdn3d: fix uninitialized variable use
Anton Khirnov [Thu, 28 Feb 2013 07:47:21 +0000 (08:47 +0100)]
vf_hqdn3d: fix uninitialized variable use

CC:libav-stable@libav.org
(cherry picked from commit d0a863ac891eae49ceaa4de7f759270bc87e668d)

Conflicts:

libavfilter/vf_hqdn3d.c

6 years agovf_gradfun: fix uninitialized variable use
Anton Khirnov [Thu, 28 Feb 2013 07:47:21 +0000 (08:47 +0100)]
vf_gradfun: fix uninitialized variable use

CC:libav-stable@libav.org
(cherry picked from commit 887d31d455915b6bde6814063384dafdee61164c)

Conflicts:

libavfilter/vf_gradfun.c

6 years agolzo: fix overflow checking in copy_backptr()
Xi Wang [Fri, 15 Mar 2013 10:59:22 +0000 (06:59 -0400)]
lzo: fix overflow checking in copy_backptr()

The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.

Remove the check.  Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6)

6 years agoflacdec: simplify bounds checking in flac_probe()
Xi Wang [Fri, 15 Mar 2013 11:11:47 +0000 (07:11 -0400)]
flacdec: simplify bounds checking in flac_probe()

Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 8425d693eefbedbb41f91735614d41067695aa37)

6 years agoatrac3: avoid oversized shifting in decode_bytes()
Xi Wang [Fri, 15 Mar 2013 10:31:21 +0000 (06:31 -0400)]
atrac3: avoid oversized shifting in decode_bytes()

When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.

    (0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))

Avoid oversized shifting.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit eba1ff31304e407db3cefd7532108408f364367b)

6 years agoupdate for 1.1.4
Michael Niedermayer [Thu, 14 Mar 2013 16:39:57 +0000 (17:39 +0100)]
update for 1.1.4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agojpegdec: be less picky on padding
Michael Niedermayer [Thu, 14 Mar 2013 16:20:44 +0000 (17:20 +0100)]
jpegdec: be less picky on padding

Fixes Ticket2353

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoiff: fix integer overflow
Michael Niedermayer [Tue, 5 Mar 2013 00:35:28 +0000 (01:35 +0100)]
iff: fix integer overflow

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3dbc0ff9c3e6f6e0d08ea3d42cb33761bae084ba)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomsrledec: fix output_end checks
Michael Niedermayer [Tue, 5 Mar 2013 01:19:12 +0000 (02:19 +0100)]
msrledec: fix output_end checks

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e398990eb87785e20e065cd3f14d1dbb69df4392)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomsrledec: merge switches
Michael Niedermayer [Wed, 30 Jan 2013 15:41:33 +0000 (16:41 +0100)]
msrledec: merge switches

More speedup and fixes 'may be used uninitialized in this function' warnings

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomsrledec: move loop into switch
Michael Niedermayer [Wed, 30 Jan 2013 15:39:35 +0000 (16:39 +0100)]
msrledec: move loop into switch

speeds up code and allows more simplifications

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomsrledec: move output pointer test up
Michael Niedermayer [Wed, 30 Jan 2013 15:33:45 +0000 (16:33 +0100)]
msrledec: move output pointer test up

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agompegaudio_parser: fix off by 1 error
Michael Niedermayer [Thu, 14 Mar 2013 03:41:26 +0000 (04:41 +0100)]
mpegaudio_parser: fix off by 1 error

See:
commit 29d8cd265a536063420afe78375b2176a9e1abc5
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Tue Feb 26 21:47:11 2013 -0800

    mp3dec: Fix VBR bit rate parsing

    When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.

    When parsing the stream, don't override the bit rate if it's already set,
    otherwise calculate the mean bit rate from parsed frames. This way, the bit
    rate will be set correctly both for CBR and VBR streams.

Signed-off-by: Alexander Kojevnikov <alexander@kojevnikov.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Thu, 14 Mar 2013 03:27:35 +0000 (04:27 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  eamad: allocate a dummy reference frame when the real one is missing
  libmp3lame: use the correct remaining buffer size when flushing
  png: use av_mallocz_array() for the zlib zalloc function
  wmaprodec: require block_align to be set.
  ffv1: fix calculating slice dimensions for version 2
  xxan: fix invalid memory access in xan_decode_frame_type0()
  wmadec: require block_align to be set.
  ivi_common: do not call MC for intra frames when dc_transform is unset

Conflicts:
libavcodec/ffv1dec.c
libavcodec/ivi_common.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '747fbe0c212b81952bb27ec7b99fa709081e2d63' into release/1.1
Michael Niedermayer [Thu, 14 Mar 2013 01:34:01 +0000 (02:34 +0100)]
Merge commit '747fbe0c212b81952bb27ec7b99fa709081e2d63' into release/1.1

* commit '747fbe0c212b81952bb27ec7b99fa709081e2d63':
  roqvideodec: fix a potential infinite loop in roqvideo_decode_frame().
  mp3dec: Fix VBR bit rate parsing
  wmaprodec: return an error, not 0, when the input is too small.
  vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
  h264: check for luma and chroma bit dept being equal
  Prepare for 9.4 Release

Conflicts:
RELEASE
libavcodec/vmdav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoshorten: use the unsigned type where needed
Luca Barbato [Tue, 5 Mar 2013 16:12:35 +0000 (17:12 +0100)]
shorten: use the unsigned type where needed

get_uint returns an unsigned value, use an unsigned to store
blocksize to make sure the comparison logic is correct and report
correctly the error for the channel count not supported.

CC: libav-stable@libav.org
(cherry picked from commit 5cf7c72757779a740e897a97710aac044fe5258c)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
6 years agoshorten: report meaningful errors
Luca Barbato [Tue, 5 Mar 2013 15:34:16 +0000 (16:34 +0100)]
shorten: report meaningful errors

(cherry picked from commit 4c364eb2b856fc33cf7b42f7c7b979e69fde5f3a)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
6 years agoshorten: K&R formatting cosmetics
Luca Barbato [Tue, 5 Mar 2013 15:11:28 +0000 (16:11 +0100)]
shorten: K&R formatting cosmetics

(cherry picked from commit a2ad554def214d2d03b7c16f68dc081a8622f9ca)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
6 years agoshorten: set invalid channels count to 0
Michael Niedermayer [Tue, 5 Mar 2013 14:13:04 +0000 (15:13 +0100)]
shorten: set invalid channels count to 0

Prevent the loop shorten_decode_close from writing and freeing out of
the array boundary.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
(cherry picked from commit c10da30d8426a1f681d99a780b6e311f7fb4e5c5)

6 years agompegts: clear avprograms only for removed programs
Michael Niedermayer [Mon, 4 Feb 2013 22:41:53 +0000 (23:41 +0100)]
mpegts: clear avprograms only for removed programs

Fixes Ticket2186

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

6 years agoeamad: allocate a dummy reference frame when the real one is missing
Anton Khirnov [Wed, 13 Feb 2013 20:04:42 +0000 (21:04 +0100)]
eamad: allocate a dummy reference frame when the real one is missing

Fixes invalid reads when the first frame is not an I-frame.

CC:libav-stable@libav.org
(cherry picked from commit 7b89cd20d844cbe763ca34e63e99d110043cf241)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
6 years agolibmp3lame: use the correct remaining buffer size when flushing
Justin Ruggles [Wed, 16 Jan 2013 22:52:55 +0000 (17:52 -0500)]
libmp3lame: use the correct remaining buffer size when flushing

CC:libav-stable@libav.org
(cherry picked from commit e984f47873258b600fd88423f40e3cdaad179190)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agopng: use av_mallocz_array() for the zlib zalloc function
Justin Ruggles [Wed, 16 Jan 2013 23:10:57 +0000 (18:10 -0500)]
png: use av_mallocz_array() for the zlib zalloc function

Fixes valgrind uninitialized memory errors when decoding png.

CC:libav-stable@libav.org
(cherry picked from commit 486f0b0cfc800cd38ec06635630539431d296774)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agowmaprodec: require block_align to be set.
Anton Khirnov [Wed, 6 Mar 2013 08:58:00 +0000 (09:58 +0100)]
wmaprodec: require block_align to be set.

Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.

CC:libav-stable@libav.org
(cherry picked from commit cacad1c058f66558ec727faac3b277d2dee264d4)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoffv1: fix calculating slice dimensions for version 2
Anton Khirnov [Tue, 19 Feb 2013 07:15:07 +0000 (08:15 +0100)]
ffv1: fix calculating slice dimensions for version 2

It got broken in 0f13cd3187192ba0cc2b043430de6e279e7b97c3.

CC:libav-stable@libav.org
(cherry picked from commit d243896987b8b2062d1faba4d8d6f0c62d2dbee9)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoxxan: fix invalid memory access in xan_decode_frame_type0()
Anton Khirnov [Wed, 6 Mar 2013 08:06:16 +0000 (09:06 +0100)]
xxan: fix invalid memory access in xan_decode_frame_type0()

The loop a few lines below the xan_unpack() call accesses up to
dec_size * 2 bytes into y_buffer, so dec_size must be limited to
buffer_size / 2.

CC:libav-stable@libav.org
(cherry picked from commit 8a49d2bcbe7573bb4b765728b2578fac0d19763f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoroqvideodec: fix a potential infinite loop in roqvideo_decode_frame().
Anton Khirnov [Wed, 6 Mar 2013 08:15:19 +0000 (09:15 +0100)]
roqvideodec: fix a potential infinite loop in roqvideo_decode_frame().

When there is just 1 byte remanining in the buffer, nothing will be read
and the loop will continue forever. Check that there are at least 8
bytes, which are always read at the beginning.

CC:libav-stable@libav.org
(cherry picked from commit 3e2f200237af977b9253b0aff121eee27bcedb44)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agowmadec: require block_align to be set.
Anton Khirnov [Wed, 6 Mar 2013 08:58:00 +0000 (09:58 +0100)]
wmadec: require block_align to be set.

Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.

CC:libav-stable@libav.org
(cherry picked from commit ea1136baafb1fe271cb56c3f4d7bff0267e3c70f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agomp3dec: Fix VBR bit rate parsing
Alexander Kojevnikov [Thu, 7 Mar 2013 05:38:55 +0000 (21:38 -0800)]
mp3dec: Fix VBR bit rate parsing

When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.

When parsing the stream, don't override the bit rate if it's already set,
otherwise calculate the mean bit rate from parsed frames. This way, the bit
rate will be set correctly both for CBR and VBR streams.

CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit eae0879d961b78717dd2a0899809ad22819ae9e3)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoivi_common: do not call MC for intra frames when dc_transform is unset
Anton Khirnov [Wed, 6 Mar 2013 08:41:44 +0000 (09:41 +0100)]
ivi_common: do not call MC for intra frames when dc_transform is unset

CC:libav-stable@libav.org
(cherry picked from commit 3ba40ebb6cc58753dc3746c718203bb31760deba)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agowmaprodec: return an error, not 0, when the input is too small.
Anton Khirnov [Wed, 6 Mar 2013 09:02:50 +0000 (10:02 +0100)]
wmaprodec: return an error, not 0, when the input is too small.

Returning 0 may result in an infinite loop in valid calling programs. A
decoder should never return 0 without producing any output.

CC:libav-stable@libav.org
(cherry picked from commit 4c0080b7e7d501e2720d2a61f5186a18377f9d63)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agovmdaudio: fix invalid reads when packet size is not a multiple of chunk size
Anton Khirnov [Wed, 6 Mar 2013 09:42:51 +0000 (10:42 +0100)]
vmdaudio: fix invalid reads when packet size is not a multiple of chunk size

CC:libav-stable@libav.org
(cherry picked from commit f86d66bcfa48998b0727aa0d1089a30cbeae0933)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoh264: check for luma and chroma bit dept being equal
Luca Barbato [Mon, 4 Mar 2013 10:21:08 +0000 (11:21 +0100)]
h264: check for luma and chroma bit dept being equal

The decoder assumes a single bit depth for all the planes
while the specification allows different bit depths for luma
and chroma.

Avoid the possible problems described in CVE-2013-2277

CC: libav-stable@libav.org
(cherry picked from commit 4987faee78b9869f8f4646b8dd971d459df218a5)

Conflicts:

libavcodec/h264.c

6 years agoPrepare for 9.4 Release
Reinhard Tartler [Sat, 9 Mar 2013 16:49:23 +0000 (17:49 +0100)]
Prepare for 9.4 Release

6 years agoaacsbr: Check for envelope scalefactors overflowing
Michael Niedermayer [Fri, 8 Mar 2013 13:00:22 +0000 (14:00 +0100)]
aacsbr: Check for envelope scalefactors overflowing

This prevents various values from becoming stuck at NAN and
output to become silent
If someone knows a cleaner solution, thats welcome!

Fixes Ticket2335

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

6 years agopsymodel: dont apply lowpass filters with a cutoff close to the nyquist
Michael Niedermayer [Thu, 7 Mar 2013 18:28:30 +0000 (19:28 +0100)]
psymodel: dont apply lowpass filters with a cutoff close to the nyquist

The IIR filter numerically diverges in such cases, this could easily be
fixed but would make the filter slower on some platforms

Fixes Ticket2246

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

6 years agoavformat: Fix apics with aac
Michael Niedermayer [Thu, 7 Mar 2013 12:55:43 +0000 (13:55 +0100)]
avformat: Fix apics with aac

Fixes Ticket2318

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

6 years agohls: fix timebase
Michael Niedermayer [Thu, 7 Mar 2013 12:42:12 +0000 (13:42 +0100)]
hls: fix timebase

Fixes Ticket1733

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

6 years agobuildsys: only include log2_tab per library for shared builds
Michael Niedermayer [Mon, 4 Mar 2013 11:25:02 +0000 (12:25 +0100)]
buildsys: only include log2_tab per library for shared builds

Fix linking failures with -all_load due to multiple log2_tabs

Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
(cherry picked from commit 03148fd1743fca98c2f4b5920b796f381e820045)

6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Sun, 3 Mar 2013 11:15:14 +0000 (12:15 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  update Changelog
  h264: set ref_count to 0 for intra slices.
  h264: on reference overflow, reset the reference count to 0, not 1.
  flvdec: Check the return value of a malloc

Conflicts:
Changelog
libavcodec/h264.c
libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '1b0082eabcc98e079d33c61da4d30ded89de68a9' into release/1.1
Michael Niedermayer [Sun, 3 Mar 2013 10:56:42 +0000 (11:56 +0100)]
Merge commit '1b0082eabcc98e079d33c61da4d30ded89de68a9' into release/1.1

* commit '1b0082eabcc98e079d33c61da4d30ded89de68a9':
  flvdec: Don't read the VP6 header byte when setting codec type based on metadata
  vorbisdec: Accept 0 amplitude_bits
  vorbisdec: Error on bark_map_size equal to 0.
  vorbisdec: Add missing checks
  ac3dec: validate channel output mode against channel count

Conflicts:
libavcodec/ac3dec.c
libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agortmpproto: Check APP_MAX_LENGTH
Michael Niedermayer [Sat, 23 Feb 2013 15:58:01 +0000 (16:58 +0100)]
rtmpproto: Check APP_MAX_LENGTH

Fixes Ticket2292

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoupdate Changelog
Reinhard Tartler [Sat, 2 Mar 2013 09:54:07 +0000 (10:54 +0100)]
update Changelog

6 years agoh264: set ref_count to 0 for intra slices.
Anton Khirnov [Thu, 14 Feb 2013 10:44:33 +0000 (11:44 +0100)]
h264: set ref_count to 0 for intra slices.

CC:libav-stable@libav.org
(cherry picked from commit 437211ae73ef1ed8285b4fed7620502ea4999e11)

Fixes deadlocks waiting for non-existing references with some fuzzed files.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoh264: on reference overflow, reset the reference count to 0, not 1.
Anton Khirnov [Thu, 14 Feb 2013 10:43:20 +0000 (11:43 +0100)]
h264: on reference overflow, reset the reference count to 0, not 1.

Since decode_slice_header() returns before the reference lists are
constructed, there are zero valid references.

CC:libav-stable@libav.org
(cherry picked from commit 668e16a0dd1ff56d4beeff5c658d8a2a08dbfac8)

Conflicts:

libavcodec/h264.c

6 years agoflvdec: Check the return value of a malloc
Martin Storsjö [Fri, 1 Mar 2013 14:45:24 +0000 (16:45 +0200)]
flvdec: Check the return value of a malloc

The callers of this function can't report errors sanely. If this
one malloc fails, don't write the extradata byte, make sure we
try to malloc it the next time we're called instead, and make sure
we still consume the input data byte.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoflvdec: Don't read the VP6 header byte when setting codec type based on metadata
Martin Storsjö [Fri, 1 Mar 2013 14:30:44 +0000 (16:30 +0200)]
flvdec: Don't read the VP6 header byte when setting codec type based on metadata

This header byte is only present when actually reading a VP6 frame,
not when reading the codec type field in the metadata. This
potential bug has been present since 5b54a90c.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoRequire at least three frames to autodetect loas.
Carl Eugen Hoyos [Sat, 2 Feb 2013 21:36:25 +0000 (22:36 +0100)]
Require at least three frames to autodetect loas.
(cherry picked from commit a60530e3ee1d9532c026a52b03661f88e163d647)

6 years agolavf/avio: check for : in filenames for protocols.
Nicolas George [Wed, 27 Feb 2013 18:19:15 +0000 (19:19 +0100)]
lavf/avio: check for : in filenames for protocols.

If the first "special" character in a filename is a comma,
it can introduce protocol options, but only if there is a
colon at the end. Otherwise, it is just a filename with a
comma.

Fix trac ticket #2303.
(cherry picked from commit d9fad53f4b447db1e436dcf3fc4a57e604616e6c)

6 years agodoc/ffmpeg: remove non ascii char
Michael Niedermayer [Wed, 27 Feb 2013 15:08:41 +0000 (16:08 +0100)]
doc/ffmpeg: remove non ascii char

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoSlight bug building ffmpeg-1.1.3 on OSX + patch to fix
David Favor [Wed, 27 Feb 2013 14:19:14 +0000 (08:19 -0600)]
Slight bug building ffmpeg-1.1.3 on OSX + patch to fix

Two instances of non-ascii characters have crept into file
doc/filters.texi which causes pod2man to error out and
break the build.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agovorbisdec: Accept 0 amplitude_bits
Luca Barbato [Sun, 24 Feb 2013 15:56:15 +0000 (16:56 +0100)]
vorbisdec: Accept 0 amplitude_bits

The specification does not prevent an encoder to write the amplitude 0
as 0 amplitude_bits.

Our get_bits() implementation might not support a zero sized read
properly, thus the additional branch.
(cherry picked from commit 23bd9ef4b209c789d5473d75f89a2e411d343d80)

Conflicts:

libavcodec/vorbisdec.c

6 years agovorbisdec: Error on bark_map_size equal to 0.
Michael Niedermayer [Thu, 10 Jan 2013 23:54:12 +0000 (00:54 +0100)]
vorbisdec: Error on bark_map_size equal to 0.

The value is used to calculate output LSP curve and a division by zero
and out of array accesses would occur.

CVE-2013-0894

CC: libav-stable@libav.org
Reported-by: Dale Curtis <dalecurtis@chromium.org>
Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 11dcecfcca0eca1a571792c4fa3c21fb2cfddddc)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agovorbisdec: Add missing checks
Luca Barbato [Sun, 24 Feb 2013 11:30:30 +0000 (12:30 +0100)]
vorbisdec: Add missing checks

Rate and order must not be 0 even if the specification does not say that
explicitly.
(cherry picked from commit 5b47c19bfda92273ae49e83db26a565afcaed80a)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoac3dec: validate channel output mode against channel count
Justin Ruggles [Wed, 20 Feb 2013 16:41:20 +0000 (11:41 -0500)]
ac3dec: validate channel output mode against channel count

Damaged frames can lead to a mismatch, which can cause a segfault
due to using an incorrect channel mapping.

CC:libav-stable@libav.org
(cherry picked from commit d7c450436fcb9d3ecf59884a574e7684183e753d)

Conflicts:

libavcodec/ac3dec.c

6 years agodoc/APIchanges: List merge commit hashes and version numbers
Michael Niedermayer [Wed, 13 Feb 2013 02:32:23 +0000 (03:32 +0100)]
doc/APIchanges: List merge commit hashes and version numbers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoapichanges: fix 2 wrong hashes
Michael Niedermayer [Thu, 14 Feb 2013 20:13:32 +0000 (21:13 +0100)]
apichanges: fix 2 wrong hashes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoapichanges: Use , instead of / to seperate multiple hashes
Michael Niedermayer [Thu, 14 Feb 2013 19:34:10 +0000 (20:34 +0100)]
apichanges: Use , instead of / to seperate multiple hashes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoapichanges: fix date
Michael Niedermayer [Thu, 14 Feb 2013 19:32:24 +0000 (20:32 +0100)]
apichanges: fix date

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agodoc/APIchanges: fix odd .01 versions
Michael Niedermayer [Thu, 14 Feb 2013 02:31:31 +0000 (03:31 +0100)]
doc/APIchanges: fix odd .01 versions

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoaac: reconfigure output on pop
Michael Niedermayer [Fri, 22 Feb 2013 16:33:22 +0000 (17:33 +0100)]
aac: reconfigure output on pop

Fixes Ticket1918

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Tue, 26 Feb 2013 02:04:03 +0000 (03:04 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  doc: developer: Allow tabs in the vim configuration for Automake files
  doc: filters: Correct BNF FILTER description
  Prepare for 9.3 Release
  update Changelog
  cavs: initialize various context tables to 0
  4xm: check the return value of read_huffman_tables().
  qtrle: add more checks against pixel_ptr being negative.
  mlpdec: do not try to allocate a zero-sized output buffer.
  av_memcpy_backptr: avoid an infinite loop for back = 0
  flicvideo: avoid an infinite loop in byte run compression
  lagarith: avoid infinite loop in lag_rac_refill()
  mov: use the format context for logging.
  loco: check that there is data left after decoding a plane.
  update Changelog
  x86: h264: Don't use redzone in AVX h264_deblock on Win64

Conflicts:
Changelog
RELEASE
libavcodec/4xm.c
libavcodec/loco.c
libavcodec/qtrle.c
libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavc/bink: Chech for malloc failure
James Almer [Wed, 6 Feb 2013 01:34:29 +0000 (22:34 -0300)]
lavc/bink: Chech for malloc failure

Based on commit 8ab2173ed141aa2c3336be7f9880340dfb8dcf5e

6 years agodoc/Makefile: Fix make docclean
James Almer [Sat, 19 Jan 2013 03:48:59 +0000 (00:48 -0300)]
doc/Makefile: Fix make docclean

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4f8b73129bb3845d9aadbf3dec3027b1136092a6)

6 years agolatmenc: Check for LOAS sync word
James Almer [Wed, 16 Jan 2013 21:27:14 +0000 (18:27 -0300)]
latmenc: Check for LOAS sync word

Write the packet unaltered if found.

Fixes ticket #1917

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b454c64e0311d813fef9c22cf34f83c2ce77ab23)

6 years agodoc: developer: Allow tabs in the vim configuration for Automake files
Diego Biurrun [Fri, 22 Feb 2013 21:06:37 +0000 (22:06 +0100)]
doc: developer: Allow tabs in the vim configuration for Automake files

While we do not use Automake in libav, this allows our config to be
used more globally without introducing unwanted breakage.
(cherry picked from commit 040c565e51985477a8fa5e42d2ddfb26ebde6608)

Conflicts:

doc/developer.texi

6 years agodoc: filters: Correct BNF FILTER description
Vicente Jimenez Aguilar [Wed, 20 Feb 2013 01:35:00 +0000 (02:35 +0100)]
doc: filters: Correct BNF FILTER description

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit b5ad422bf4e671a8b30ce73ad236cd6b49940af9)

6 years agoPrepare for 9.3 Release
Reinhard Tartler [Sun, 24 Feb 2013 08:29:17 +0000 (09:29 +0100)]
Prepare for 9.3 Release

6 years agovf_mp: Set pseudo pal
Michael Niedermayer [Sat, 23 Feb 2013 18:25:46 +0000 (19:25 +0100)]
vf_mp: Set pseudo pal

Fixes ticket2140
Fixes null pointer dereference

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

6 years agoupdate Changelog
Reinhard Tartler [Sat, 23 Feb 2013 13:49:16 +0000 (14:49 +0100)]
update Changelog

6 years agocavs: initialize various context tables to 0
Anton Khirnov [Thu, 14 Feb 2013 13:39:41 +0000 (14:39 +0100)]
cavs: initialize various context tables to 0

Avoids crashes with corrupted files.

CC:libav-stable@libav.org
(cherry picked from commit 4f3b058c84f570e261d743c7c22f865617fd28ac)

Conflicts:

libavcodec/cavs.c

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years ago4xm: check the return value of read_huffman_tables().
Anton Khirnov [Wed, 13 Feb 2013 19:46:08 +0000 (20:46 +0100)]
4xm: check the return value of read_huffman_tables().

CC:libav-stable@libav.org
(cherry picked from commit 8097fc9a2dd49d8e467b16c8bafaa96242b7fe46)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoqtrle: add more checks against pixel_ptr being negative.
Anton Khirnov [Thu, 14 Feb 2013 16:58:12 +0000 (17:58 +0100)]
qtrle: add more checks against pixel_ptr being negative.

CC:libav-stable@libav.org
(cherry picked from commit e10659244782b26061e7d52c06437de32a43a7af)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agomlpdec: do not try to allocate a zero-sized output buffer.
Anton Khirnov [Thu, 14 Feb 2013 13:05:35 +0000 (14:05 +0100)]
mlpdec: do not try to allocate a zero-sized output buffer.

CC:libav-stable@libav.org
(cherry picked from commit 0dff40bfb9a0b24d56ecd64cd90c8f724cc5745f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoav_memcpy_backptr: avoid an infinite loop for back = 0
Anton Khirnov [Wed, 13 Feb 2013 20:36:25 +0000 (21:36 +0100)]
av_memcpy_backptr: avoid an infinite loop for back = 0

CC:libav-stable@libav.org
(cherry picked from commit f935aca44c674d30e3ed940ef73bbad1228a5855)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoflicvideo: avoid an infinite loop in byte run compression
Anton Khirnov [Thu, 14 Feb 2013 11:40:36 +0000 (12:40 +0100)]
flicvideo: avoid an infinite loop in byte run compression

When byte_run is 0, pixel_countdown is not touched and the loop will run
forever.

CC:libav-stable@libav.org
(cherry picked from commit ddfe1246d98f70cdce368a2176196ba26ed7bf2d)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agolagarith: avoid infinite loop in lag_rac_refill()
Anton Khirnov [Thu, 14 Feb 2013 07:47:17 +0000 (08:47 +0100)]
lagarith: avoid infinite loop in lag_rac_refill()

range == 0 happens with corrupted files

CC:libav-stable@libav.org
(cherry picked from commit de6dfa2bb82df916a67e5036b0ef96a944781ed3)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agomov: use the format context for logging.
Anton Khirnov [Thu, 14 Feb 2013 11:47:43 +0000 (12:47 +0100)]
mov: use the format context for logging.

CC:libav-stable@libav.org
(cherry picked from commit 56daf10e0313c5e36f43e773f457d2a99ff0df10)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoloco: check that there is data left after decoding a plane.
Anton Khirnov [Thu, 14 Feb 2013 08:08:35 +0000 (09:08 +0100)]
loco: check that there is data left after decoding a plane.

CC:libav-stable@libav.org
(cherry picked from commit 067432c1c95882c7221e694f33d9f3bdbe46de7f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoupdate Changelog
Reinhard Tartler [Fri, 22 Feb 2013 20:52:56 +0000 (21:52 +0100)]
update Changelog

6 years agoFix Win64 AVX h264_deblock by not using redzone on Win64 n1.1.3
Matt Wolenetz [Fri, 15 Feb 2013 21:59:40 +0000 (13:59 -0800)]
Fix Win64 AVX h264_deblock by not using redzone on Win64

Thanks-to: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 82a4a4e7caa96cea9aa2185c4c3110a5e9fde7c2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoupdate for 1.1.3
Michael Niedermayer [Fri, 22 Feb 2013 21:53:53 +0000 (22:53 +0100)]
update for 1.1.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomatroska: fix missing ,
Andrea3000 [Thu, 21 Feb 2013 21:24:26 +0000 (22:24 +0100)]
matroska: fix missing ,

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoh264: check that luma and chroma depth match
Michael Niedermayer [Thu, 21 Feb 2013 14:00:59 +0000 (15:00 +0100)]
h264: check that luma and chroma depth match

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bdeb61ccc67911cfc5e20c7cfb1312d0501ca90a)

Conflicts:

libavcodec/h264_ps.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec_decode_audio4: check got_frame_ptr before handling initial skip
Michael Niedermayer [Thu, 21 Feb 2013 21:00:19 +0000 (22:00 +0100)]
avcodec_decode_audio4: check got_frame_ptr before handling initial skip

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8a6449167a6da8cb747cfe3502ae86ffaac2ed48)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoh264: ensure that get_format() is called when changing format but not otherwise.
Michael Niedermayer [Thu, 21 Feb 2013 01:46:02 +0000 (02:46 +0100)]
h264: ensure that get_format() is called when changing format but not otherwise.

Fixes Ticket2288

Tested-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 04220b473e9d7b22d737405348f9904f22bcfb96)

Conflicts:

libavcodec/h264.c

6 years agox86: h264: Don't use redzone in AVX h264_deblock on Win64
Matt Wolenetz [Fri, 15 Feb 2013 21:59:40 +0000 (13:59 -0800)]
x86: h264: Don't use redzone in AVX h264_deblock on Win64

This fixes crashes in chromium on win64 on machines with AVX
(crashes that apparently aren't triggered by fate).

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

Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoMerge remote-tracking branch 'qatar/release/9' into release/1.1
Michael Niedermayer [Fri, 22 Feb 2013 21:44:15 +0000 (22:44 +0100)]
Merge remote-tracking branch 'qatar/release/9' into release/1.1

* qatar/release/9:
  doc: Fix some obsolete references to av* tools as ff* tools
  vqavideo: check chunk sizes before reading chunks
  roqvideodec: check dimensions validity
  qdm2: check array index before use, fix out of array accesses
  mpegvideo: Do REBASE_PICTURE with byte pointers

Conflicts:
libavcodec/qdm2.c
libavcodec/roqvideodec.c
libavcodec/vqavideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoFix bits_per_coded_sample when encoding png with frame-level multithreading.
Carl Eugen Hoyos [Wed, 20 Feb 2013 21:54:21 +0000 (22:54 +0100)]
Fix bits_per_coded_sample when encoding png with frame-level multithreading.

Fixes ticket #2290.
(cherry picked from commit c4dc6c4c86a052b7ba53fa7ae0c1b0643ad70d0b)

6 years agodoc: Fix some obsolete references to av* tools as ff* tools
Vicente Jimenez Aguilar [Sat, 16 Feb 2013 02:08:36 +0000 (03:08 +0100)]
doc: Fix some obsolete references to av* tools as ff* tools

Signed-off-by: Diego Biurrun <diego@biurrun.de>
CC: libav-stable@libav.org
(cherry picked from commit 202b5f6deb65e405b07b9b5c20f97c8cb925cf49)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agovqavideo: check chunk sizes before reading chunks
Michael Niedermayer [Fri, 25 Jan 2013 05:11:59 +0000 (06:11 +0100)]
vqavideo: check chunk sizes before reading chunks

Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)

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

CC: libav-stable@libav.org
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit f7d18deb73d1dd1b27b2c7062c9a10d168a6c62a)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>