1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00
Commit Graph

85475 Commits

Author SHA1 Message Date
Michael Niedermayer
42163d4c55 avutil/internal: Do not enable CHECKED with DEBUG
This avoids potential undefined behavior in debug mode while still allowing
developers which want to check for potential additional overflows to do so
by manually enabling this.

Reviewed-by: wm4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a44b3abb4c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
4e8c5721b3 avcodec/clearvideo: Check buf_size before decoding frame
Fixes; Timeout
Fixes: 1826/clusterfuzz-testcase-minimized-5728569256837120

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 43c394dcae)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
f85a71527a avcodec/aacdec_fixed: Fix runtime error: signed integer overflow: -2147483648 * -1 cannot be represented in type 'int'
Fixes: 1825/clusterfuzz-testcase-minimized-6002833050566656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8e87d146d7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
a49743407b avcodec/smc: Check remaining input
Fixes: Timeout
Fixes: 1818/clusterfuzz-testcase-minimized-5039166473633792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 356194fcb1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
190787a026 avcodec/diracdec: Fix off by 1 error in quant check
Fixes: out of array read
Fixes: 1781/clusterfuzz-testcase-minimized-4617176877105152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b946bd8ef2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
80cebb992c avcodec/jpeg2000dec: Fix copy and paste error
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5782e0ba8c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
38fd2a33b9 avcodec/jpeg2000dec: Check tile offsets
Fixes: runtime error: signed integer overflow: 4096 - -2147483648 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 89325417e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Max Justicz
861c05b286 avcodec/sanm: Fix uninitialized reference frames
Fixes: poc.snm

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ca616b0f72)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
ba7ea7c4b1 avcodec/jpeglsdec: Check get_bits_left() before decoding a picture
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4bc3008d04)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Max Justicz
6b839e9aa3 avcodec/fmvc: Fix use of uninitialized memory when the first frame is not a keyframe
Fixes: fmvc-poc.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3766aa7343)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
abd5277318 avcodec/ivi_dsp: Fix multiple runtime error: left shift of negative value -71
Fixes: 1734/clusterfuzz-testcase-minimized-5385630815092736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8fb00b3e85)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
17a4e791bf avcodec/mjpegdec: Fix runtime error: signed integer overflow: -32767 * 130560 cannot be represented in type 'int'
Fixes: 1724/clusterfuzz-testcase-minimized-4842395432648704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 40fa6a2fa2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
e73efe4691 avcodec/aacdec_fixed: Fix runtime error: shift exponent 34 is too large for 32-bit type 'int'
Fixes: 1721/clusterfuzz-testcase-minimized-4719352135811072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b5228e44c7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
a7442f8d35 avcodec/mpeg4videodec: Check for multiple VOL headers
Fixes multiple: runtime error: signed integer overflow: 2147115008 + 413696 cannot be represented in type 'int'
Fixes: 1723/clusterfuzz-testcase-minimized-5309409372667904
Fixes: 1727/clusterfuzz-testcase-minimized-5900685306494976
Fixes: 1737/clusterfuzz-testcase-minimized-5922321338466304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit efeb47fd5d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
d11c686204 avcodec/vp9block: fix runtime error: signed integer overflow: 196675 * 20670 cannot be represented in type 'int'
Fixes: 1710/clusterfuzz-testcase-minimized-4837032931098624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d4ee767808)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
0ea475942e avcodec/vmnc: Check location before use
Fixes: runtime error: signed integer overflow: 65535 * 64256 cannot be represented in type 'int'
Fixes: 1717/clusterfuzz-testcase-minimized-5491696676634624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ec2b76aab4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
3cfb016071 avcodec/takdec: Fix runtime error: signed integer overflow: 8192 * 524308 cannot be represented in type 'int'
Fixes: 1630/clusterfuzz-testcase-minimized-6326111917047808

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 955db41192)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
f832d7361d avcodec/aac_defines: Fix: runtime error: left shift of negative value -2
Fixes: 1716/clusterfuzz-testcase-minimized-4691012196761600

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c3547dcbc3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
ff4f525905 avcodec/takdec: Fix runtime error: left shift of negative value -63
Fixes: 1713/clusterfuzz-testcase-minimized-5791887476654080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d66193252b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
a5875f8a1e avcodec/mlpdsp: Fix runtime error: signed integer overflow: -24419392 * 128 cannot be represented in type 'int'
Fixes: 1711/clusterfuzz-testcase-minimized-5248503515185152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1d04fc94e1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
f397613f05 avcodec/sbrdsp_fixed: fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: part of 1709/clusterfuzz-testcase-minimized-4513580554649600

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 384508b2ff)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
9c65a87bd4 avcodec/aacsbr_fixed: Fix multiple runtime error: shift exponent 170 is too large for 32-bit type 'int'
Fixes part of 1709/clusterfuzz-testcase-minimized-4513580554649600

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6310fc714d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
e605faaabc avcodec/mlpdec: Do not leave a invalid num_primitive_matrices in the context
Fixes: runtime error: index 8 out of bounds for type 'uint8_t [8]'
Fixes: 1699/clusterfuzz-testcase-minimized-6327177438035968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 64ea4d102a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
f3b6ea1408 avcodec/aacsbr_fixed: Fix multiple runtime error: shift exponent 150 is too large for 32-bit type 'int'
Fixes: 1681/clusterfuzz-testcase-minimized-5970545365483520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3fb104f447)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
e46bc3052d avcodec/mimic: Use ff_set_dimensions() to set the dimensions
Fixes: OOM
Fixes: 1671/clusterfuzz-testcase-minimized-4759078033162240

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e434840fd4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
f254c7ea13 avcodec/fic: Fix multiple runtime error: signed integer overflow: 5793 * 419752 cannot be represented in type 'int'
Fixes: 1669/clusterfuzz-testcase-minimized-5287529198649344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a173f484b5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
fc7c379060 avcodec/pixlet: Fix reading invalid numbers of bits
Fixes: asertion failure
Fixes: 1664/clusterfuzz-testcase-minimized-6587801187385344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d32ebce8fd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
686eb3b1ed avcodec/mlpdec: Fix: runtime error: left shift of negative value -8
Fixes: 1658/clusterfuzz-testcase-minimized-4889937130291200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 25c81e4b73)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
b6c0ad571f avcodec/dfa: Fix: runtime error: signed integer overflow: -14202 * 196877 cannot be represented in type 'int'
Fixes: 1657/clusterfuzz-testcase-minimized-4710000079405056

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 58ac7fb9c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
72e5607c87 avcodec/aacdec: Fix runtime error: signed integer overflow: 2147483520 + 255 cannot be represented in type 'int'
Fixes: 1656/clusterfuzz-testcase-minimized-5900404925661184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 94d05ff159)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
4186702184 avcodec/aacdec_template: Fix fixed point scale in decode_cce()
Fixes: runtime error: shift exponent 1073741824 is too large for 32-bit type 'int'
Fixes: 1654/clusterfuzz-testcase-minimized-5151903795118080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 53a502206a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
fedd8b6507 avcodec/fmvc: Fix off by 1 error
Fixes: out of array access
Fixes: 1643/clusterfuzz-testcase-minimized-6117573403869184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e11dcc35bb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
6ebb9e7b77 avcodec/flicvideo: Check frame_size before decrementing
Fixes: runtime error: signed integer overflow: -2147483627 - 22 cannot be represented in type 'int'
Fixes: 1637/clusterfuzz-testcase-minimized-5376582493405184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 355e27e24d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
6e788fadae avcodec/mlpdec: Fix runtime error: left shift of negative value -1
Fixes: 1636/clusterfuzz-testcase-minimized-5310494757879808

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 552adf1dd3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
f34dc82d56 avcodec/takdec: Fix runtime error: left shift of negative value -42
Fixes: 1635/clusterfuzz-testcase-minimized-4992749856096256

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 99c4c76cfb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
b7b28b6aad avcodec/hq_hqa: Fix: runtime error: signed integer overflow: -255 * 10180917 cannot be represented in type 'int'
Fixes: 1626/clusterfuzz-testcase-minimized-6416580571299840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3d9cb583c8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
21d50c185d avcodec/scpr: mask bits to prevent out of array read
Fixes: 1615/clusterfuzz-testcase-minimized-6625214647500800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5666b95c9f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
72e5ccfe37 avcodec/truemotion1: Fix multiple runtime error: signed integer overflow: 1246906962 * 2 cannot be represented in type 'int'
Fixes: 1616/clusterfuzz-testcase-minimized-5119196578971648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5ea6bc2a166edac37042f2bbc28eb603a0fbeccb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
b147ded288 avcodec/svq3: Fix runtime error: left shift of negative value -6
Fixes: 1604/clusterfuzz-testcase-minimized-5312060206350336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a6eb006ad4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Michael Niedermayer
75697b500c avcodec/tiff: reset sampling[] if its invalid
Fixes divission by 0
Fixes: clusterfuzz-testcase-minimized-5592896440893440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f08122fbe0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-02 01:14:38 +02:00
Martin Storsjö
1cbeb16187 configure: Fix the msvcrt version check for mingw32
This was actually broken when committed in 46e3936fb04; the
test never succeeded, and thus, _aligned_malloc wasn't actually
used on legacy mingw.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 427f7a1f9e)
2017-05-31 13:03:07 +02:00
Matthieu Bouron
6ee4b20f4a lavf/mov: make invalid m{d,v}hd time_scale default to 1 instead of erroring out
Some samples have their metadata track time_scale incorrectly set to 0
and the check introduced by a398f054fd
prevents playback of those samples. Setting the time_scale to 1 fixes
playback.
2017-05-23 15:53:37 +02:00
Matthieu Bouron
3e38bf95c5 lavc/ffjni: add missing '\n' 2017-05-23 15:50:46 +02:00
Matthieu Bouron
cbae648eb8 lavc/mediacodec_wrapper: do not declare JNIAMedia{Codec,CodecList,Format}Fields on the stack 2017-05-23 15:50:42 +02:00
Matthieu Bouron
2fb25e2dd6 lavc/mediacodec_wrapper: fix local reference leaks 2017-05-23 15:50:38 +02:00
Timo Rothenpieler
3bc5e427e4 avcodec/nvenc: remove unnecessary alignment
Fixes #6260
2017-05-23 11:50:45 +02:00
Hendrik Leppkes
8640339dbb Use AVOnce as a static variable consistently
Using AVOnce as a stack variable makes no sense as the state is lost
when the function exits.

This fixes repeated calls to av(filter/device)_register_all
2017-05-22 12:36:52 +02:00
Muhammad Faiz
7fae0ea21d avfilter: take_samples: do not directly return frame when samples are skipped
Modifying data pointer when skipping samples may make it unaligned.
Workaround for Ticket6349.

This should fix the crash of ticket's testcase and a crash/regression
with avxsynth (reported by Michael Niedermayer).

Also change frame->nb_samples < max to frame->nb_samples <= max.
This improves performance. Benchmark:
./ffmpeg -filter_complex "aevalsrc=0:n=1166,firequalizer=fixed=on" -f null null
old:
  25767 decicycles in take_samples,    1023 runs,      1 skips
  25422 decicycles in take_samples,    2047 runs,      1 skips
  25181 decicycles in take_samples,    4095 runs,      1 skips
  24904 decicycles in take_samples,    8191 runs,      1 skips

new:
    550 decicycles in take_samples,    1024 runs,      0 skips
    548 decicycles in take_samples,    2048 runs,      0 skips
    545 decicycles in take_samples,    4096 runs,      0 skips
    544 decicycles in take_samples,    8192 runs,      0 skips

Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
(cherry picked from commit fc3a03fcf9)
2017-05-20 23:30:29 +07:00
Aaron Levinson
19fea7d703 avutil/hwcontext_dxva2: Don't improperly free IDirect3DSurface9 objects
Add dxva2_pool_release_dummy() and use it in call to
av_buffer_create() in dxva2_pool_alloc().

Prior to this change, av_buffer_create() was called with NULL for the
third argument, which indicates that av_buffer_default_free() should
be used to free the buffer's data.  Eventually, it gets to
buffer_pool_free() and calls buf->free() on a surface object (which is
av_buffer_default_free()).

This can result in a crash when the debug version of the C-runtime is
used on Windows.  While it doesn't appear to result in a crash when
the release version of the C-runtime is used on Windows, it likely
results in memory corruption, since av_free() is being called on
memory that was allocated using
IDirectXVideoAccelerationService::CreateSurface().

Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
(cherry picked from commit 0c1c514643)
2017-05-16 22:00:48 +01:00
Michael Niedermayer
c1c50650df Changelog: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 18:22:27 +02:00