2329 Commits

Author SHA1 Message Date
Michael Niedermayer
dec5586bc7 Merge commit '9841654c158c80e9d525ba03754135d3f34e306e' into release/1.1
* commit '9841654c158c80e9d525ba03754135d3f34e306e':
  arm: Suppress tags about used cpu arch and extensions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-10 13:44:40 +01:00
Martin Storsjö
9841654c15 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:12:19 +02:00
lvqcl
1eb59e4d54 avutil/x86/cpu: fix cpuid sub-leaf selection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e58fc44649d07d523fcd17aa10d9eb0d3a5ef3f4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-21 04:40:03 +01:00
Michael Niedermayer
e68114868f avutil/cpu: force mmx on selection of higher x86 SIMD features
Fixes various runtime failures with manually set flags that represent no
existing CPU

Fixes Ticket3653

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 23:15:37 +02:00
Michael Niedermayer
a8dd7fe5b9 Merge commit '503322f97c5a25a020933ed4ab510697d5f5b4af' into release/1.1
* commit '503322f97c5a25a020933ed4ab510697d5f5b4af':
  lzo: Handle integer overflow

Conflicts:
	libavutil/lzo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-25 22:40:30 +02:00
Luca Barbato
503322f97c lzo: Handle integer overflow
get_len can overflow for specially crafted payload.

Reported-By: Don A. Baley <donb@securitymouse.com>
CC: libav-stable@libav.org

(cherry picked from commit ccda51b14c0fcae2fad73a24872dce75a7964996)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-06-25 14:43:46 +02:00
Michael Niedermayer
574bf2ce4c avutil/lzo: add asserts to be double sure against overflows
These asserts cannot fail since d6af26c55c1ea30f85a7d9edbc373f53be1743ee

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 15:14:30 +02:00
Michael Niedermayer
1f2f6b247a avutil/lzo: Fix integer overflow
Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)

Fixes: LMS-2014-06-16-4
Found-by: "Don A. Bailey" <donb@securitymouse.com>
See: ccda51b14c0fcae2fad73a24872dce75a7964996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d6af26c55c1ea30f85a7d9edbc373f53be1743ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 15:14:28 +02:00
Lukasz Marek
88ec8021ce lavu/opt: validate range before dereference
This change make error handling simplier.
av_opt_freep_ranges may be called when some ranges are NULL,
for example after memory allocation fail.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3aac5fcfa9d3748659d78ab2a66d0ccce22cfd4f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 00:21:28 +02:00
Michael Niedermayer
1997487f67 avutil/log: skip IO calls on empty strings
These occur when no context is set for example, thus they are common

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-07 04:04:07 +01:00
Michael Niedermayer
67c3e3de55 avutil/opt: initialize ret
Fixes CID1108610
Fixes use of uninitialized variable

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-07 04:04:07 +01:00
Michael Niedermayer
f1f06710c4 Merge remote-tracking branch 'qatar/release/9' into release/1.1
* qatar/release/9:
  arm: hpeldsp: prevent overreads in armv6 asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-07 03:59:18 +01:00
Michael Niedermayer
993c2a256d Merge commit '798c715f4fa5cde37456af6202a32ee62cfb96d9' into release/1.1
* commit '798c715f4fa5cde37456af6202a32ee62cfb96d9':
  configure: enable PIC on s390(x)
  ituh263: reject b-frame with pp_time = 0
  lagarith: reallocate rgb_planes when needed
  truemotion1: check the header size
  shorten: pad the internal bitstream buffer
  samplefmt: avoid integer overflow in av_samples_get_buffer_size()

Conflicts:
	libavcodec/lagarith.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-07 03:54:51 +01:00
Janne Grunau
460b948283 arm: hpeldsp: prevent overreads in armv6 asm
Based on a patch by Russel King <rmk+libav@arm.linux.org.uk>

Bug-Id: 646
CC: libav-stable@libav.org
2014-03-05 19:45:00 +01:00
Justin Ruggles
3e3805b7fa samplefmt: avoid integer overflow in av_samples_get_buffer_size()
CC:libav-stable@libav.org
(cherry picked from commit 0e830094ad0dc251613a0aa3234d9c5c397e02e6)
2014-02-28 23:05:53 -05:00
Michael Niedermayer
08dde7567d Merge remote-tracking branch 'qatar/release/9' into release/1.1
* qatar/release/9:
  Update Changelog for 9.11
  oggparseogm: check timing variables
  mathematics: remove asserts from av_rescale_rnd()
  vc1: Always reset numref when parsing a new frame header.
  h264: reset num_reorder_frames if it is invalid

Conflicts:
	Changelog
	libavcodec/vc1.c
	libavutil/mathematics.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 06:41:15 +01:00
Anton Khirnov
03bfd8419f mathematics: remove asserts from av_rescale_rnd()
It is a public function, it must not assert on its parameters.

(cherry picked from commit 94a417acc05cc5151b473abc0bf51fad26f8c5a0)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-02-01 23:51:46 -05:00
Anton Khirnov
10f77c165c pixdesc: mark gray8 as pseudopal
Many functions treat it as such already.
Fixes Bug 499.

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-31 23:00:31 +02:00
Michael Niedermayer
426715ccbd avutil/intfloat_readwrite: include common.h for isinf()
Solution based on rational.c, which uses isinf() too

This should fix compilation with msvc

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:45:02 +02:00
Michael Niedermayer
a4e3bb0106 avutil/intfloat_readwrite: avoid comparission with INFINITY, use isinf()
Should fix pgc warning

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:56 +02:00
Michael Niedermayer
cd2d8aca84 avutil/log: Fix context pointer used for get_category()
Fixes calling a random pointer

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 00:44:52 +02:00
Michael Niedermayer
bd593a98dc 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>
2013-03-18 03:05:36 +01:00
Xi Wang
22c27e1f4a 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)
2013-03-15 13:21:15 +01:00
Anton Khirnov
48fd461977 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>
2013-02-23 14:40:30 +01:00
Michael Niedermayer
7d3e217623 Merge remote-tracking branch 'qatar/release/9' into release/1.1
* qatar/release/9:
  arm: Fall back to runtime cpu feature detection via /proc/cpuinfo
  doc/platform: Fix 10l typo
  xxan: properly handle odd heights.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-14 13:50:08 +01:00
Martin Storsjö
5310da7e83 arm: Fall back to runtime cpu feature detection via /proc/cpuinfo
On recent android versions, /proc/self/auxw is unreadable
(unless the process is running running under the shell uid or
in debuggable mode, which makes it hard to notice). See
http://b.android.com/43055 and
https://android-review.googlesource.com/51271 for more information
about the issue.

This makes sure e.g. neon optimizations are enabled at runtime in
android apps even when built in release mode, if configured to
use the runtime detection.

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

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-14 10:39:23 +02:00
Michael Niedermayer
9a697cfe71 lavu: test for broken binutils on ARM
Some old gnu assemblers fail to assemble qdadd correctly
Ideally we should check this at build time, but better to
check at run time than mysteriously failing.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-05 16:25:37 +01:00
Nicolas George
305180f525 lavu/base64: return meaningful error code. 2013-01-05 15:40:40 +01:00
Michael Niedermayer
f27eb1b702 lavu: check that assert level is defined
fix warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-05 12:21:39 +01:00
Michael Niedermayer
498e1c6bb9 lavu: check av_clip*() limits
This code cannot use av_assert* due to circular header dependancies

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-04 22:19:31 +01:00
Clément Bœsch
f263426eed lavu/math: fix than/then typo, and add a comma. 2013-01-03 00:02:51 +01:00
Michael Niedermayer
740e740895 av_rescale: support passing MIN/MAX through
Reviewed-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-03 00:02:22 +01:00
Stefano Sabatini
69d75dc4dd lavu/base64: extend/clarify doxy for the base64 API
Also improve overall consistency.
2013-01-02 23:52:35 +01:00
Clément Bœsch
49a78e6b8c lavu/eval: handle div by zero in mod().
Similarly to 03f5043f5, we use the FTRAPV config setting.
2013-01-02 23:15:45 +01:00
Diego Biurrun
bcb8d9eb8f Drop unnecessary 'l' length modifier when printfing double values.
%f denotes a double argument and 'l' does nothing in this case
according to the C spec.
2012-12-31 11:20:45 +01:00
Michael Niedermayer
2ce43b37fc Merge commit '6dd93ee6f1b050ad7c4b247899e83efa293ee405'
* commit '6dd93ee6f1b050ad7c4b247899e83efa293ee405':
  hlsenc: check append_entry return value
  hlsenc: use the basename to generate the list entries
  avstring: add av_basename and av_dirname

Conflicts:
	Changelog
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-30 13:54:50 +01:00
Luca Barbato
d8fd06c37d avstring: add av_basename and av_dirname
Thread safe version of the common basename and dirname.
2012-12-29 17:26:22 +01:00
Michael Niedermayer
c5bea1b02b xtea: fix unused variable warning for config_small
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-29 03:37:46 +01:00
Michael Niedermayer
33f15ab35d libavutil/samplefmt: Fix project name
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-28 14:05:41 +01:00
Michael Niedermayer
2f9903f662 Merge commit '418693bdc5edad72b0d055f741931612d797eb05'
* commit '418693bdc5edad72b0d055f741931612d797eb05':
  lavc: rewrite and extend AVFrame doxy
  opt: avoid segfault in av_opt_next() if the class does not have an option list
  ttadec: fix last frame handling when seeking
  alacdec: do not be too strict about the extradata size

Conflicts:
	libavcodec/alac.c
	libavcodec/avcodec.h
	libavcodec/tta.c
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-23 13:32:40 +01:00
Justin Ruggles
d02202e08a opt: avoid segfault in av_opt_next() if the class does not have an option list
CC: libav-stable@libav.org
2012-12-22 15:43:27 -05:00
Michael Niedermayer
7e90053822 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: increase edge_emu_buffer size for VC1
  lavc: merge latest x86inc.asm fixes with x264

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-20 02:51:35 +01:00
Michael Niedermayer
af804dbe9e Merge commit '523c7bd23c781aa0f3a85044896f5e18e8b52534'
* commit '523c7bd23c781aa0f3a85044896f5e18e8b52534':
  misc typo, style and wording fixes

Conflicts:
	libavcodec/options_table.h
	libavutil/pixfmt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-19 14:28:58 +01:00
Ronald S. Bultje
a34d9ad969 lavc: merge latest x86inc.asm fixes with x264
Unbreak NASM support.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-19 07:27:33 +01:00
Diego Biurrun
523c7bd23c misc typo, style and wording fixes 2012-12-18 13:36:51 +01:00
Clément Bœsch
9ad6b13020 lavu/pixdesc: fix a const qualifier discarding warning. 2012-12-16 20:41:28 +01:00
Clément Bœsch
7fb49639e6 lavu: make sure av_pix_fmt_desc_next returns a valid pix fmt.
This is required because there are some "holes" in the list for
compatibility with the fork.

The commit also removes the now unecessary check from cmdutils.

Found-by: wm4
2012-12-16 20:39:39 +01:00
Michael Niedermayer
a01fe55077 Merge commit 'c0dc57f1264dad1e121772d03abdb9e14ed8857f'
* commit 'c0dc57f1264dad1e121772d03abdb9e14ed8857f':
  asyncts: merge two conditions
  x86inc: fully concatenate tokens to fix macro expansion for nasm
  h264: initialize frame-mt context copies properly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:43:46 +01:00
Michael Niedermayer
58f30175e1 mem: minor simplification of the alignment hack code
Idea-by: wanzhang
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 05:36:22 +01:00
Janne Grunau
0995ad8db4 x86inc: fully concatenate tokens to fix macro expansion for nasm
Fixes build errors with nasm introduced in 6f40e9f070f7 for stack
memory alignment. Noticed by BugMaster.
2012-12-13 23:57:09 +01:00