Commit Graph

66883 Commits

Author SHA1 Message Date
Clément Bœsch
dbda574694 avcodec/gif: fix off by one in column offsetting finding
(cherry picked from commit f9240ec01a)
2015-02-16 18:08:45 +01:00
James Almer
3c63503792 avutil/opencl: don't include config.h
It's not an installed header.

Tested-by: Thilo Borgmann <thilo.borgmann@mail.de>
Tested-by: Wei Gao <highgod0401@gmail.com>
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 3aaff80348)
2015-02-14 02:21:19 -03:00
James Almer
a78b7c504a x86/swr: add missing alignment check to pack_6ch functions
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 5f14f9e984)
2015-02-14 02:21:14 -03:00
Michael Niedermayer
d66d5d6188 Update for 2.4.7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 21:18:42 +01:00
Michael Niedermayer
cb7d72ed18 avcodec/flac_parser: fix handling EOF if no headers are found
Fixes assertion failure
Fixes Ticket4269

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:09 +01:00
Michael Niedermayer
74c7273b5d avfilter/vf_framepack: Check and update frame_rate
The frame_rate update was missing leaving the output frame rate
wrong.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:09 +01:00
Michael Niedermayer
416501da1a avdevice: Use av_format_get_control_message_cb()
This is required as the location of this field could change and is
specified in libavformat not avdevice

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:09 +01:00
Michael Niedermayer
43924a8e99 avcodec/hevc: Fix handling of skipped_bytes() reallocation failures
Fixes CID1260704

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:09 +01:00
wm4
d705125b94 qpeg: avoid pointless invalid memcpy()
If refdata was NULL, the memcpy() ended up copying the same memory
block onto itself, which is not only pointless, but also undefined
behavior.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:09 +01:00
Michael Niedermayer
1a263f0dd9 avcodec/arm/videodsp_armv5te: Fix linking failure with "g++ -shared -D__STDC_CONSTANT_MACROS -o test.so ... libavcodec.a"
Tested-by: Andreas Haupt
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cab6302534)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:09 +01:00
Michael Niedermayer
492818d724 avcodec/mjpegdec: Skip blocks which are outside the visible area
Fixes out of array accesses
Fixes: ffmpeg_mjpeg_crash.avi

Found-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 08509c8f86)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Carl Eugen Hoyos
ca98c016cd lavc/aarch64: Do not use the neon horizontal chroma loop filter for H.264 4:2:2.
(cherry picked from commit 4faea46bd9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
6005f375aa avcodec/h264_slice: assert that reinit does not occur after the first slice
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2fd9ce92af)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
4d5beea7a1 avcodec/h264_slice: ignore SAR changes in slices after the first
Fixes race condition and null pointer dereference
Fixes: signal_sigsegv_1472ac3_468_cov_2915641226_CABACI3_Sony_B.jsv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
2073ab266e avcodec/h264_slice: Check picture structure before setting the related fields
This might fix a hypothetical race condition

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
7b213e88b5 avcodec/h264_slice: Do not change frame_num after the first slice
Fixes potential race condition
Fixes: signal_sigsegv_1472ac3_468_cov_2915641226_CABACI3_Sony_B.jsv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
b250375e77 avutil/opt: Fix type used to access AV_OPT_TYPE_SAMPLE_FMT
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1750b45cdf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
1cc419eae8 avutil/opt: Fix types used to access AV_OPT_TYPE_PIXEL_FMT
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a0640e6346)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
9dc8f44829 avcodec/h264: Be more strict on rejecting pps/sps changes
Fixes race condition
Fixes: signal_sigsegv_1472ac3_468_cov_2915641226_CABACI3_Sony_B.jsv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
724c79276a avcodec/h264: Be more strict on rejecting pps_id changes
Fixes race condition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 31cc9c04ca)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
3e46e3a33c avcodec/h264_ps: More completely check the bit depths
Fixes out of array read
Fixes: asan_static-oob_30328b6_719_cov_3325483287_H264_artifacts_motion.h264

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
0c125519ec avformat/thp: Check av_get_packet() for failure not only for partial output
Fixes null pointer dereference
Fixes: signal_sigsegv_db2c1f_3108_cov_163322880_pikmin2_opening1_partial.thp

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
076b98c9b7 swscale/utils: Limit filter shifting so as not to read from prior the array
Fixes out of array read
Fixes: asan_heap-oob_1fb2f9b_3780_cov_3984375136_usf.mkv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
8413ddcd39 avcodec/mpegvideo_motion: Fix gmc chroma dimensions
Fixes integer overflow and out of array read
Fixes: asan_heap-oob_1fb2f9b_3780_cov_3984375136_usf.mkv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
0882212298 avcodec/mjpegdec: Check number of components for JPEG-LS
Fixes out of array accesses
Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
3531ff8db3 avcodec/mjpegdec: Check escape sequence validity
Fixes assertion failure
Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
ee8e48d386 avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05e1619529)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
wm4
600c6ebc7d avformat/mpc8: fix broken pointer math
This could overflow and crash at least on 32 bit systems.

Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b737a2c528)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
wm4
2515de3b15 avformat/mpc8: fix hang with fuzzed file
This can lead to an endless loop by seeking back a few bytes after each
attempted chunk read. Assuming negative sizes are always invalid, this
is easy to fix. Other code in this demuxer treats negative sizes as
invalid as well.

Fixes ticket #4262.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
wm4
e2e835f017 avformat/tta: fix crash with corrupted files
av_add_index_entry() can fail, for example because the parameters are
invalid, or because memory allocation fails. Check this; it can actually
happen with corrupted files.

The second hunk is just for robustness. Just in case functions like
ff_reduce_index() remove entries. (Not sure if this can actually
happen.)

Fixes ticket #4294.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a0cd529a3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
a31fdcef55 avcodec/mpegvideo_enc: Fix number suffixes in rc_buffer_size calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4531e2c489)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
8a16b27de9 avcodec/h264_cabac: use int instead of long for mbb_xy
The mb address fits in int

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
b8546aee84 avformat/omadec: fix number suffix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f1f7f5903a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
84e5b314f3 avformat/smacker: Fix number suffix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 465f3705b1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
1497f355c7 avformat/matroskadec: Fix number suffixes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fc3cdb00d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
096fd2698a avcodec/dxtory: Use LL instead of L number suffix
This is probably unneeded and normal int would be fine, but its
safer to use LL and this isnt speed relevant

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
1ecce1c6a7 swresample/dither: Cleanup number suffixes
The <<31 case needs LL

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
01b5e61845 avformat/utils: Fix number suffixes in tb_unreliable()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4b15bba2ae)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
05a8114c71 doc/APIchanges: fill in more missing hash values and dates
all values before 2.5 seem to be filled in now

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:08 +01:00
Michael Niedermayer
5080ab26d3 doc/APIchanges: fill in and correct some values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0d64982828)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:07 +01:00
Michael Niedermayer
2029acb667 doc/APIchanges: Add av_find_best_pix_fmt_of_2() and av_get_pix_fmt_loss()
also add deprecation note for avcodec_get_pix_fmt_loss(), avcodec_find_best_pix_fmt_of_2()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:07 +01:00
Michael Niedermayer
0a878d0c94 doc/APIchanges: Fill in some more missing hash values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bbdd940f36)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:48:07 +01:00
Michael Niedermayer
92595faab9 Merge commit '532c96a2158c04f265d750d54f2f103b8d9fe0ef' into release/2.4
* commit '532c96a2158c04f265d750d54f2f103b8d9fe0ef':
  matroskadec: Fix read-after-free in matroska_read_seek()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:32:53 +01:00
Michael Niedermayer
9d1e775b89 Merge commit '891de4b27a07b808839b9e873b6a886248c8fd6b' into release/2.4
* commit '891de4b27a07b808839b9e873b6a886248c8fd6b':
  log: Unbreak no-tty support on 256color terminals

Conflicts:
	libavutil/log.c

No change, FFmpeg is not affected by this bug
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 20:30:52 +01:00
Clément Bœsch
2c1d5f43cf avfilter/dctdnoiz: fix slice_h computation
ceilf() can only work if the reminder of the division is not 0.

This fixes memory errors with for instance:
  ffmpeg -f lavfi -i testsrc=s=800x500 -threads 3 -vf dctdnoiz -frames:v 1 -f null -

(cherry picked from commit eb7efaa924)
2015-02-12 20:22:02 +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
Michael Niedermayer
fa1ca88cb6 Merge commit '4039f11ed82d84009b5146f0a563f33ced33e4db' into release/2.4
* commit '4039f11ed82d84009b5146f0a563f33ced33e4db':
  Prepare for 11.2 Release

Conflicts:
	RELEASE

Merge for metadata only as this is not correct for 2.4.*

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-18 03:56:09 +01:00
Michael Niedermayer
2b95572b10 Merge commit '5f6f2412211609e46d3f3573f4ac4e136534f1d4' into release/2.4
* commit '5f6f2412211609e46d3f3573f4ac4e136534f1d4':
  doc: Update the Changelog for release 11.2

Conflicts:
	Changelog

No change as the changelog is not correct for FFmpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-18 03:54:58 +01:00
Michael Niedermayer
f5dd1270d9 Merge commit 'ff77fa754bf2d6e7231d2e050babefa9a13d1fec' into release/2.4
* commit 'ff77fa754bf2d6e7231d2e050babefa9a13d1fec':
  vp7: fix checking vp7_feature_value_size()

See: 28f8114bd2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-18 03:53:04 +01:00