Commit Graph

77248 Commits

Author SHA1 Message Date
Clément Bœsch
43ecec0f03 avformat: use AV_OPT_TYPE_BOOL in a bunch of places 2015-12-04 15:43:33 +01:00
Clément Bœsch
0e62b5d1ef avfilter: use AV_OPT_TYPE_BOOL in a bunch of places 2015-12-04 15:37:06 +01:00
Clément Bœsch
fb99ef0bd3 avcodec: use AV_OPT_TYPE_BOOL in a bunch of places 2015-12-04 15:37:05 +01:00
Andreas Cadhalpun
a611375db5 ffmdec: reject zero-sized chunks
If size is zero, avio_get_str fails, leaving the buffer uninitialized.
This causes invalid reads in av_set_options_string.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-04 15:20:04 +01:00
Andreas Cadhalpun
488e9a06f0 ffmdec: only seek back at EOF if a server is attached
Otherwise the ffm demuxer can return the same packets endlessly, if
there is no server attached.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-04 15:20:04 +01:00
Hendrik Leppkes
3c4e49187f libavcodec/aacsbr_tablegen: fix tablegen on windows
Including these headers is not needed and breaks building on Windows as it
tries to activate the full compat tools, which are not needed for host
tools.
2015-12-04 14:49:40 +01:00
Hendrik Leppkes
42a9aead85 avcodec: include tablegen compat header before the tablegen functionality 2015-12-04 14:49:38 +01:00
Hendrik Leppkes
d6b988b505 libavutil/tablegen: add missing math.h include 2015-12-04 14:49:35 +01:00
Michael Niedermayer
0c1d62ab9d avformat/oggparsetheora: Check duration to be not AV_NOPTS_VALUE (and positive) before use
Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_7322_4fad88a38dc8952dc20dcb60c1895758.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 13:47:58 +01:00
Michael Niedermayer
2ff61c3c1a avcodec/dnxhddec: Fix runtime error: left shift of negative value
Fixes: 2abd25478c62a675f335fac00b467023/asan_static-oob_10aff98_1227_8811480c6ef1e970a7977ceb7e5a9958.mxf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 13:44:22 +01:00
Michael Niedermayer
9d44e23618 ffmpeg: Check pkt_dts for AV_NOPTS_VALUE
Fixes integer overflow
Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_2039_8d1797aeb823ea43858d0fa45c9eb899.ogv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 13:37:04 +01:00
Michael Niedermayer
18268f761b avcodec/vp3: Fix "runtime error: left shift of negative value"
Fixes: 5c6129154b356b80bcab86f9e3ee5d29/signal_sigabrt_7ffff6ae7cc9_7322_d26ac6d7cb6567db1b8be0159b387d0b.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 13:37:00 +01:00
Yann Coupin
d89c4846e0 avformat/movenc: HE-AAC correct FourCC in ISML
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 03:52:25 +01:00
Michael Niedermayer
9696a01f12 avformat/mpjpegdec: Fix "libavformat/mpjpegdec.c:269:9: warning: passing argument 3 of av_stristart from incompatible pointer type"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 03:09:00 +01:00
Vicente Olivert Riera
a27401a05b mips: rename mipsdspr1 to mipsdsp
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 02:35:42 +01:00
Sebastian Dröge
eb3628d87f mpegtsenc: Fix off-by-one in indexing into Opus channel mapping arrays
Fixes, CID1338323, CID1338324

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 02:35:20 +01:00
Michael Niedermayer
77a644e6fa avcodec/h264_direct: Check CO-POCs before use
Fixes harmless integer overflow
Fixes mozilla bug 1230286

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 01:55:11 +01:00
Michael Niedermayer
cafb195604 avformat/utils: Fix "libavformat/utils.c:927:35: runtime error: signed integer overflow: -2450238577049583619 - 9223090561878065151 cannot be represented in type long long"
Fixes Mozilla bug 1229205

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-04 00:44:06 +01:00
Rostislav Pehlivanov
ed08cbd7b1 aacenc_ltp: fix out of bounds memory access
Discovered by Coverity.
2015-12-03 23:12:37 +00:00
Michael Niedermayer
4e31176e14 avformat/riffdec: remove special case for bitrate > 32bit
AVCodecContext.bitrate is 64bit

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 20:20:09 +01:00
Michael Niedermayer
32bf6550cb avformat/riffdec: Initialize bitrate
Fixes CID1338334

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 20:20:09 +01:00
Nicolas George
085ab74972 lavf/mpegts: use AVERROR_INVALIDDATA instead of AVERROR(EINTR). 2015-12-03 19:16:12 +01:00
Nicolas George
eb2e4fb674 lavf/lxfdec: use FFERROR_REDO instead of AVERROR(EAGAIN). 2015-12-03 19:16:12 +01:00
Nicolas George
cb14d30240 lavf/mpeg: use FFERROR_REDO instead of AVERROR(EAGAIN). 2015-12-03 19:16:12 +01:00
Nicolas George
0bac7a436b lavf/flvdec: use FFERROR_REDO instead of AVERROR(EAGAIN).
Fix trac ticket #5041.
2015-12-03 19:16:12 +01:00
Nicolas George
3ab1e5a48c lavf: add FFERROR_REDO to let demuxers return no packet. 2015-12-03 19:16:12 +01:00
Timo Teräs
64f7db554e mpegencts: Fix overflow in cbr mode period calculations
ts->mux_rate is int (signed 32-bit) type. The period calculations
will start to overflow when mux_rate > 5mbps. This fixes overflows
by converting first to 64-bit type.

Fixes #5044.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 17:43:30 +01:00
Martin Storsjö
1077d8c845 configure: Add -framework CoreVideo when building the avfoundation indev
This fixes builds with --disable-vda, which previously failed with
undefined references to CVImageBuffer* and CVPixelBuffer* functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-12-03 14:28:12 +02:00
Paul B Mahol
fff7f2df31 avfilter/af_agate: change default for detection to rms
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
4a43e559e1 avfilter/af_sidechaincompress: kill init function
Should make addition of process_command easier.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
1b22bdf4e3 avfilter/af_agate: compile agate only when requested.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
6907046130 avfilter/af_agate: add level_sc option for sidechaingate filter
Also correct usage of input gain for both filters.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:52 +01:00
Paul B Mahol
bd5afecdcb avfilter: add sidechaingate filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:51 +01:00
Paul B Mahol
acc2347cf4 avfilter/af_agate: prepare for adding sidechain version
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-03 11:07:51 +01:00
Hendrik Leppkes
46db068c59 tests/api: Fix API test build on windows with --enable-shared 2015-12-03 10:21:28 +01:00
James Almer
9ac5beaa86 avformat/mpjpegdec: fix mixed declarations and code 2015-12-03 01:39:47 -03:00
Michael Niedermayer
b46dcd5209 avutil/timecode: Fix fps check
The fps variable is explicitly set to -1 in case of some errors, the check must
thus be signed or the code setting it needs to use 0 as error code
the type of the field could be changed as well but its in an installed header

Fixes: integer overflow
Fixes: 9982cc157b1ea90429435640a989122f/asan_generic_3ad004a_3799_22cf198d9cd09928e2d9ad250474fa58.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 04:09:48 +01:00
Michael Niedermayer
0afdfbe116 avcodec/jpeg2000: fix type of arguments of tag_tree_size
Fixes: out of array read
Fixes: 36b8096fefab16c4c9326a508053e95c/signal_sigsegv_1d9ce18_3233_1a55196b018106dfabeace071a432d9e.r3d

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 02:28:00 +01:00
Ganesh Ajjanagadde
d64b6c3819 avfilter/af_flanger: use rint instead of floor hack
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Ganesh Ajjanagadde
c6bea81acf avfilter/vf_perspective: use lrint instead of floor hack
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Ganesh Ajjanagadde
fa5d299496 avfilter/vsrc_mptestsrc: use lrint instead of floor hack
lrint is faster, and is more consistent across the codebase.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Ganesh Ajjanagadde
1bb7db217d avutil/crc: avoid needless space wastage of hardcoded crc table
There was no reason AFAIK for making AV_CRC_24_IEEE 12. This simply
resulted in wasted space under --enable-hardcoded-tables:
dynamic: 1318672 libavutil/libavutil.so.55
old    : 1330680 libavutil/libavutil.so.55
new    : 1326488 libavutil/libavutil.so.55

Minor version number is bumped, with ifdefry due to API breakage.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-02 18:31:56 -05:00
Michael Niedermayer
26379d4fdd avcodec/vp3: ensure header is parsed successfully before tables
Fixes assertion failure
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Michael Niedermayer
ec7a3be11e avformat/utils: Move end_time1 AV_NOPTS_VALUE Check after rescale
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Michael Niedermayer
d872643cfe avformat/utils: Check AVFormatContext->duration in compute_chapters_end() before use
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-03 00:13:27 +01:00
Kylie McClain
bf12a81cc6 configure: Replace pr since it is not provided by busybox
While pr is a valid POSIX.1 command, its usage in configure
is a little borderline and is possible to replace it with
printf.

Bug-Id: 913

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-02 23:49:10 +01:00
Luca Barbato
5f3a081b42 avi: Spin out the logic to position to the next non-interleaved stream
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-02 23:49:10 +01:00
Luca Barbato
cb49bb10ca build: Move -Wcast-qual to the extra_warnings
It amounts to about 1/2 of the warnings generated and does not help
spotting anything useful.
2015-12-02 23:49:10 +01:00
Michael Niedermayer
0fc61c6ab6 avi: Validate the stream-id for DV as well
Avoid false positives while syncing.

Bug-Id: ffmpeg/4086
Bug-Id: 879

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-02 23:49:10 +01:00
Luca Barbato
d017ed878a avi: Use the correct data type
avio_tell returns an int64_t.
2015-12-02 23:49:10 +01:00