40649 Commits

Author SHA1 Message Date
Anton Khirnov
8b86c2ed2e 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>
2015-05-05 21:41:52 +02:00
Andreas Cadhalpun
378ee3bad5 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>
2015-05-05 21:41:43 +02:00
Andreas Cadhalpun
41a89cba60 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>
2015-05-05 21:41:40 +02:00
Andreas Cadhalpun
7b66cf5ce7 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>
2015-05-05 21:41:36 +02:00
Andreas Cadhalpun
97010c74cb 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>
2015-05-05 21:41:32 +02:00
Andreas Cadhalpun
0d3a7dd264 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>
2015-05-05 21:41:26 +02:00
Thomas Guillem
3e1c9da38b matroskadec: fix crash when parsing invalid mkv
CC: libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit b8d7f3186e86234f6255f5e8ee9e98573b4d9a6e)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-04-18 16:50:30 +02:00
Anton Khirnov
420aa06a24 avconv: do not overwrite the stream codec context for streamcopy
Since we are not doing encoding, there is no point in ever touching the
separate encoding context. Always use the stream codec context.

Fixes writing attachments.

CC:libav-devel@libav.org
(cherry picked from commit 3892bdab9b652eb003ab95e167f1765e0b0ea035)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	avconv.c
2015-04-05 09:26:54 +02:00
Andreas Cadhalpun
b7c8a1fbbd webp: ensure that each transform is only used once
According to the WebP Lossless Bitstream Specification
"each transform is allowed to be used only once".

If a transform is more than once this can lead to memory
corruption.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 30e6abd1a8cc4fd5daf2e23ad2e768862c39e975)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-21 09:45:30 +01:00
Anton Khirnov
9cef65434e h264_ps: properly check cropping parameters against overflow
CC: libav-stable@libav.org
(cherry picked from commit d8a45d2d49f54fde042b195f9d5859251252493d)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-21 09:45:20 +01:00
Anton Khirnov
a529f6648e hevc: zero the correct variables on invalid crop parameters
It's the output_window that is applied to the output frame, not
pic_conf_win

(cherry picked from commit 5127c00b971b674f72609369b39a9c0f7c36977d)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-21 09:45:19 +01:00
Anton Khirnov
a219add4e8 hevc: make the crop sizes unsigned
(cherry picked from commit c929659bdd7d2d5848ea52e685a3164c7b901bb0)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-21 09:45:18 +01:00
Reinhard Tartler
00abc0080d doc: More changelog updates for v11.3 2015-03-08 21:51:11 -04:00
Michael Niedermayer
3a417a86b3 utvideodec: Handle slice_height being zero
Fixes out of array accesses.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-9604
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 0ce3a0f9d9523a9bcad4c6d451ca5bbd7a4f420d)
2015-03-09 00:51:48 +01:00
Andreas Cadhalpun
a73b2c288e adxdec: set avctx->channels in adx_read_header
It is used in adx_read_packet, which currently depends on the
decoder/parser setting this value between reading the file header and
demuxing the first packet.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-08 19:34:38 +00:00
Andreas Cadhalpun
2ef2f60b4f rmenc: limit packet size
The chunk size is limited to UINT16_MAX (written by avio_wb16), so make
sure that the packet size is not too large.

Such large frames need to be split into slices smaller than 64 kB, but
that is currently supported neither by the rv10/rv20 encoders nor the rm
muxer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-08 19:21:55 +00:00
Andreas Cadhalpun
905172d75c webp: validate the distance prefix code
According to the WebP Lossless Bitstream Specification the highest
allowed value for a prefix code is 39.

If prefix_code is too large, the calculated extra_bits has an invalid
value and triggers an assertion in get_bits.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-08 19:21:49 +00:00
Andreas Cadhalpun
8aee35acb1 rv10: check size of s->mb_width * s->mb_height
If it doesn't fit into 12 bits it triggers an assertion.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-08 19:21:41 +00:00
Federico Tomassetti
e818da7724 eamad: check for out of bounds read
Bug-Id: CID 1257500
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-08 19:19:55 +00:00
Federico Tomassetti
2c63081b48 mdec: check for out of bounds read
Bug-Id: CID 1257501
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-08 19:19:49 +00:00
Vittorio Giovara
4070e02dfc configure: Properly fail when libcdio/cdparanoia is not found 2015-03-08 19:19:39 +00:00
Anton Khirnov
77eb3d9a60 tiff: Check that there is no aliasing in pixel format selection
Fixes possible issues with unexpected bpp/bppcount values.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-8544
(cherry picked from commit ae5e1f3d663a8c9a532d89e588cbc61f171c9186)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-08 19:16:16 +01:00
Vittorio Giovara
f3dafb63d0 aic: Fix decoding files with odd dimensions
Normally the aic decoder finds the proper slice combination (multiple of
some number less than 32) but in case of odd width, it resorts to the
default values, which were actually swapped.
The number of slices is modified to account for such odd width cases.

CC: libav-stable@libav.org
(cherry picked from commit e878ec0d47cd6228c367b2f3128b76d7523f7255)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-08 17:27:53 +01:00
Luca Barbato
7136a0bf88 vorbis: Check the vlc value in setup_classifs
The valid returned values are always at most 11bit.
Remove the previous check that assumed larger values plausible and
use a signed integer to check get_vlc2 return values.

CC: libav-stable@libav.org
(cherry picked from commit 0025f7408a0fab2cab4a950064e4784a67463994)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-08 17:24:50 +01:00
Martin Storsjö
450b02307c arm: Suppress tags about used cpu arch and extensions
When all the codepaths using manually set .arch/.fpu code is
behind runtime detection, the elf attributes should be suppressed.

This allows tools to know that the final built binary doesn't
strictly require these extensions.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit dcae2e32f7d8a1ca5fb8c1e4aa81313be854dd73
and b77e335e441040a40fc6156b8e4a134745d10233)
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-08 18:11:36 +02:00
Reinhard Tartler
fc3c1156e3 doc: Update changelog for v11.3 2015-03-08 11:12:14 -04:00
Reinhard Tartler
7c1fe31617 Prepare for 11.3 Release 2015-03-08 11:06:15 -04:00
Luca Barbato
cf3523c6e7 prores: Extend the padding check to 16bit
Some files produced by the official encoder have up to 16bit of
padding instead of the expected padding to the byte.

Use a self-explanatory macro instead of a simple number.

CC: libav-stable@libav.org

(cherry picked from commit dbc1163b203b175d246b7454c32ac176f84006d1)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-02 15:34:29 +01:00
Mark McGough
e10028431d icecast: Do not use chunked post
Icecast uses HTTP 1.0 while Libav uses HTTP 1.1 and enables by
default chunked post.

Icecast actually forwards the HTTP chunk headers to the listener
as part of the media stream (without the chunk encoding HTTP headers)
causing the players to lose sync.

Disabling the option is enough to feed icecast properly.

(cherry picked from commit 76c70e33d2244a688832f03b53862eb5d9ad3b01)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-28 15:04:30 +01:00
Vittorio Giovara
4cd54b2f97 img2dec: correctly use the parsed value from -start_number
Previously the image sequence was always starting from the minimum
number rather than the requested one.

CC: libav-stable@libav.org
2015-02-22 23:51:15 +00:00
Michael Niedermayer
07db7a0dd8 h264_cabac: Break infinite loops
This fixes out of array reads and/or infinite loops.

30 is the maximum number of bits that can be read into
coeff_abs below.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-22 23:49:34 +00:00
Carl Eugen Hoyos
2d1309c352 hevc_deblock: Fix compilation with nasm
CC: libav-stable@libav.org
Bug-Id: 795
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-22 23:46:55 +00:00
Anton Khirnov
2686dab45e h264: initialize H264Context.avctx in init_thread_copy
This prevents using a wrong (first thread's) AVCodecContext if decoding
a frame in the first pass over all threads fails.

(cherry picked from commit a06b0b1295c51d100101e0ca0434e199ad6de6b5)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-21 09:35:17 +01:00
Michael Niedermayer
06d433366c h264: Do not share rbsp_buffer across threads
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
(cherry picked from commit 61928b68dc28e080b8c8191afe5541123c682bbd)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-21 09:34:48 +01:00
Anton Khirnov
1dbfaa34e6 h264: only ref cur_pic in update_thread_context if it is initialized
It may be empty if the previous thread's decode call did not contain a
valid frame.

(cherry picked from commit 0dea4c77ccf5956561bb8991311b3d834bb5fa40)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-21 09:34:17 +01:00
Xiaohan Wang
532c96a215 matroskadec: Fix read-after-free in matroska_read_seek()
In matroska_read_seek(), |tracks| is assigned at the begining of the
function. However, functions like matroska_parse_cues() could reallocate
the tracks and invalidate |tracks|.

This assigns |tracks| only before using it, so that it will not get
invalidated elsewhere.

Bug-Id: chromium/427266
2015-01-27 14:32:56 +00:00
Luca Barbato
891de4b27a log: Unbreak no-tty support on 256color terminals 2015-01-18 09:47:32 -07:00
Luca Barbato
4039f11ed8 Prepare for 11.2 Release 2015-01-14 18:05:57 +01:00
Luca Barbato
5f6f241221 doc: Update the Changelog for release 11.2 2015-01-13 00:46:20 +01:00
Michael Niedermayer
ff77fa754b vp7: fix checking vp7_feature_value_size()
CC: libav-stable@libav.org
Bug-Id: CID 1197061
(cherry picked from commit 29234f56818135faf2f1868ab324c073abd28fbd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:42 +01:00
Vittorio Giovara
431f57f046 libopusenc: prevent an out-of-bounds read by returning early
CC: libav-stable@libav.org
Bug-Id: CID 1244188
(cherry picked from commit 8dd0a2c5cf40a8a49faae985adc11750b6429132)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:42 +01:00
Vittorio Giovara
88411b87b4 display: fix order of operands
CC: libav-stable@libav.org
Bug-Id: CID 1238828 / CID 1238832
(cherry picked from commit b1b1a7370e141c912e3d0bbaa668dcee05c3ad67)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:42 +01:00
Vittorio Giovara
3f09d4f6d4 ffv1: fix out-of-bounds read
CC: libav-stable@libav.org
Bug-Id: CID 1047234
(cherry picked from commit 6abe7edabb7d57e82d7ea6312d30cf05d2192c5b)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00
Vittorio Giovara
3aba00b1b3 indeo3: check ff_set_dimensions return value
CC: libav-stable@libav.org
Bug-Id: CID 1135740
(cherry picked from commit c6d7c201dfa80502cb6cefbee7dc9160cedb5187)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00
Vittorio Giovara
796bd81835 g2meet: check ff_set_dimensions return value
CC: libav-stable@libav.org
Bug-Id: CID 1135739
(cherry picked from commit 2b5c1efa1465d8646f8be525cace7a21404e40ad)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00
Vittorio Giovara
9e0a38d32b avs: check ff_set_dimensions return value
CC: libav-stable@libav.org
Bug-Id: CID 1135738
(cherry picked from commit c7384664ba0cbb12d882effafbc6d321ae706cff)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00
Vittorio Giovara
39e07ac9fc ansi: check ff_set_dimensions return value
CC: libav-stable@libav.org
Bug-Id: CID 1135737
(cherry picked from commit 994ab1804b8bf532f44876927b07b51f1f63247f)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00
Vittorio Giovara
21aeae9c67 svq1enc: check ff_get_buffer return value
CC: libav-stable@libav.org
Bug-Id: CID 747723
(cherry picked from commit 59846452af762f6af5ced4399e8dcd709ca50fcd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00
Michael Niedermayer
dd195c2c58 on2avc: Fix out of array access
CC: libav-stable@libav.org
Bug-Id: CID 1206648
(cherry picked from commit 2fa6d21124bd2fc0b186290f5313179263bfcfb7)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00
Vittorio Giovara
29e720da76 librtmp: append the correct field to the string
Also prevent a NULL pointer dereference.

CC: libav-stable@libav.org
Bug-Id: CID 1250329 / CID 1250331
(cherry picked from commit a28468d0daf4be14761c16a3ddd33266b2380123)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-01-13 00:16:41 +01:00