Commit Graph

83420 Commits

Author SHA1 Message Date
Marton Balint a91cedf79a avfilter/ebur128: do not allow null ebur128 context in ff_ebur128_relative_threshold
The user should supply a proper context.

Fixes Coverity CID 1396246.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-04 23:54:17 +01:00
Marton Balint 1687fa2131 doc/muxers: remove confusing example for segment muxer option clocktime_wrap_duration
Detecting a leap second depends on a lot of things, segment time, segment
offset, system leap second implementation, the removed part is a huge
simplification which can be misleading, so it is best to remove it.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-04 23:36:46 +01:00
Marton Balint 85169a75e1 avformat/segment: remove last_cut check when detecting a new segment
Not starting a new segment if the elapsed microsecs since the start of the day
equals the the elapsed microsecs since the start of the day at the time of the
last cut seems plain wrong to me, Deti do you remember the original reason
behind this check?

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-04 23:36:45 +01:00
Marton Balint af621b6d6e ffplay: fix borderless mode on Windows
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-04 21:33:55 +01:00
Paul B Mahol 012dd8c99a avfilter: add midequalizer filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-04 14:47:33 +01:00
Michael Niedermayer e477f09d0b avcodec/pngdec: Check trns more completely
Fixes out of array access
Fixes: 546/clusterfuzz-testcase-4809433909559296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-04 13:22:29 +01:00
Rostislav Pehlivanov 084f3addda opus_rc: rename total_bits_used to total_bits and #define some constants
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-02-04 12:07:52 +00:00
Hendrik Leppkes 8b80feb9a7 configure: instruct MSVC 2015 to properly process UTF-8 string literals
Without the /UTF-8 switch, the MSVC compiler treats all files as in the
system codepage, instead of in UTF-8, which causes UTF-8 string literals
to be interpreted wrong.

This switch was only introduced in VS2015 Update 2, and any earlier
versions do not have an equivalent solution.

Fixes fate-sub-scc on MSVC 2015+
2017-02-04 11:21:35 +01:00
Hendrik Leppkes 647af1a0dd configure: add nologo switch to invocation of lib.exe
This suppresses the startup banner, which is consistent with all other calls
to the Windows SDK binaries.
2017-02-04 11:21:33 +01:00
Michael Niedermayer b1e2192007 avcodec/interplayvideo: Move parameter change check up
Fixes out of array read
Fixes: 544/clusterfuzz-testcase-5936536407244800.f8bd9b24_8ba77916_70c2c7be_3df6a2ea_96cd9f14

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-04 02:45:46 +01:00
Michael Niedermayer 831274fba4 avcodec/flacdsp: Avoid undefined operations in non debug builds
This fixes ubsan warnings in non debug builds by using unsigned operations

in debug builds the correct signed operations are retained so that overflows
(which should not occur in valid files and may indicate problems in the DSP code
or decoder) can be detected.

Alternatively they can be changed to unsigned unconditionally, then its
not possible though to detect overflows easily if someone wants to test
the DSP code for overflows.

The 2nd alternative would be to leave the code as it is and accept that
there are undefined operations in the DSP code and that ubsan output is
full of them in some cases.

Similar changes would be needed in some other DSP routines

Suggested-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-04 02:27:53 +01:00
Michael Niedermayer fd00203554 avcodec/flacdec: Check for invalid vlcs
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-04 02:26:37 +01:00
Werner Robitza 8addd56554 doc: clarify option on looping infinitely in movie filter
Clarify that setting loop=0 is required to make the stream loop infinitely, rather than saying that a value "less than 1" is needed.

Signed-off-by: Lou Logan <lou@lrcd.com>
2017-02-03 13:08:58 -09:00
Michael Niedermayer c347b28699 avfilter/vf_unsharp: Free out AVFrame on error
Fixes memleak
Fixes part of CID1197065

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 21:52:22 +01:00
Michael Niedermayer 19f567208c avfilter/vf_perspective: Free out AVFrame on error
Fixes memleak
Fixes part of CID1197065

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 21:52:22 +01:00
Michael Niedermayer 21a07ac191 avfilter/vf_fieldhint: Free out AVFrame on error
Fixes memleak
Fixes part of CID1197065

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 21:52:22 +01:00
Michael Niedermayer 15b2c37d5e avfilter/vf_deshake: Free out AVFrame on error
Fixes memleak
Fixes part of CID1197065

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 21:52:22 +01:00
Michael Niedermayer 3edbc2408b avfilter/vf_ciescope: Free out AVFrame on error
Fixes memleak
Fixes part of CID1197065

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 21:52:22 +01:00
Paul B Mahol c331be21c4 avcodec/ivi: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-03 20:36:23 +01:00
Paul B Mahol 2b707018bc avcodec/metasound: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-03 20:29:27 +01:00
Paul B Mahol 7ecdc03ea3 avcodec/xsubdec: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-03 20:25:53 +01:00
Paul B Mahol f09afb4a90 avcodec/mpc7: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-03 20:16:30 +01:00
Paul B Mahol 6a6e20bfdf avcodec/mpc7: return meaningful error values
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-03 20:15:00 +01:00
Paul B Mahol 207fa224a0 avcodec/mpc8: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-03 20:01:07 +01:00
Carl Eugen Hoyos 7d169ba1d8 lavf/isom: Support DTS Express in mov.
Fixes ticket #6124.
2017-02-03 19:01:59 +01:00
Clément Bœsch f7a7ea7168 doc: add a lexicon 2017-02-03 15:03:44 +01:00
Michael Niedermayer 39afd0482f avcodec/ituh263dec: Implement U263s interpretation of H.263 B frames
Fixes Ticket1536

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 03:33:37 +01:00
Aman Gupta 3606602f11 avutil/hwcontext_vaapi: fix SEGV in vaTerminate when vaInitialize fails
Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0x0000000000aff8a4 in vaTerminate ()
  #1  0x0000000000ae50ce in vaapi_device_free (ctx=<optimized out>) at libavutil/hwcontext_vaapi.c:882
  #2  0x0000000000ae1f9e in hwdevice_ctx_free (opaque=<optimized out>, data=<optimized out>) at libavutil/hwcontext.c:66
  #3  0x0000000000ad856f in buffer_replace (src=0x0, dst=0x7fffa26ef1b8) at libavutil/buffer.c:119
  #4  av_buffer_unref (buf=buf@entry=0x7fffa26ef1f8) at libavutil/buffer.c:129
  #5  0x0000000000ae299f in av_hwdevice_ctx_create (pdevice_ref=0x170ac50 <hw_device_ctx>, type=type@entry=AV_HWDEVICE_TYPE_VAAPI, device=<optimized out>,
      opts=opts@entry=0x0, flags=flags@entry=0) at libavutil/hwcontext.c:494
  #6  0x0000000000400968 in vaapi_device_init (device=<optimized out>) at ffmpeg_vaapi.c:223

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-02-02 23:47:55 +00:00
Michael Niedermayer ad7a3f5294 avcodec/utils: Fix memleak with subtitles and sidedata
Fixes: 454/fuzz-3-ffmpeg_SUBTITLE_AV_CODEC_ID_MOV_TEXT_fuzzer

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 00:27:28 +01:00
Aman Gupta 037bb4021c avfilter/scale: refactor common code for scaling height/width expressions
Implements support for height/width expressions in vf_scale_vaapi,
by refactoring common code into a new libavfilter/scale.c

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-02-02 22:58:54 +00:00
James Almer c8467abbad x86/rv34dsp: add ff_rv34_idct_dc_add_sse2
Also disable ff_rv34_idct_dc_add_mmx on x86_64 as the presence of sse2
is guaranteed in such builds.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-02 17:51:21 -03:00
James Almer ab5c4d006d x86/vp8dsp: add ff_vp8_idct_dc_add_sse2
Also disable ff_vp8_idct_dc_add_mmx on x86_64 as the presence of sse2
is guaranteed in such builds.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-02 17:18:58 -03:00
addr-see-the-website@aetey.se 712ad6b661 libavcodec/cinepakenc.c: comments cleanup (contents)
Change the encoding of the original developer name from ISO-8859-1 to UTF-8.
Remove the stale/completed TODO list.
Fix two small typos.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-02 16:31:13 +01:00
Michael Niedermayer 61f70416f8 avcodec/dca_lbr: Fix off by 1 error in freq check
Fixes out of array read
Fixes: 510/clusterfuzz-testcase-5737865715646464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-02 15:48:50 +01:00
Clément Bœsch 92cb9a3869 Merge commit '9064777dbb335ab4809ae09e3fdcc0245f925cdc'
* commit '9064777dbb335ab4809ae09e3fdcc0245f925cdc':
  checkasm: add HEVC test for testing IDCT DC

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:40:58 +01:00
Clément Bœsch f475405237 Merge commit '7f549b8338ed3775fec4bf10421ff5744e5866dd'
* commit '7f549b8338ed3775fec4bf10421ff5744e5866dd':
  riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data.

Only cosmetics, the change was already present.

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:36:34 +01:00
Clément Bœsch 5e013586bf Merge commit '6135c3b61e084be93c0876cecd06f4e764f961c0'
* commit '6135c3b61e084be93c0876cecd06f4e764f961c0':
  Revert "avprobe: Zero the allocated avio buffer memory"

This commit is a noop, see 591cf8aa0e

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:29:53 +01:00
Clément Bœsch 55b2cfa921 Merge commit 'f637046d3134a331e4b5a7243ac3dfb92735b8a5'
* commit 'f637046d3134a331e4b5a7243ac3dfb92735b8a5':
  libavutil: Always use some GCC style attributes on clang

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:26:05 +01:00
Clément Bœsch a0860b0a38 Merge commit '6f9e34baea4f6f484392e4e67f606a0835d07b73'
* commit '6f9e34baea4f6f484392e4e67f606a0835d07b73':
  arm: Check for support for the .fpu directive

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:22:04 +01:00
Matthieu Bouron d30870cc73 Merge commit 'ed9b2a5178d7a7c5a95694da3a808af327f36aff'
* commit 'ed9b2a5178d7a7c5a95694da3a808af327f36aff':
  mov: Rework the check for invalid indexes in stsc

This commit is a noop, see 3c058f5701.

The proposed fix breaks seeking in multiple_stsd.mp4 (ticket #3962) and
playback of wwwq_cut.mp4 (ticket #2991).

Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-02-02 12:15:01 +01:00
Carl Eugen Hoyos ac0863146b ffmpeg: Add a missing line break when requesting a sample. 2017-02-02 09:45:15 +01:00
Steinar H. Gunderson 08b098169b speedhq: fix out-of-bounds write
Certain alpha run lengths (for SHQ1/SHQ3/SHQ5) could be stored in
both long and short versions, and we would only accept the short version,
returning -1 (invalid code) for the others. This could cause an
out-of-bounds write on malicious input, as discovered by
Andreas Cadhalpun during fuzzing.

Fix by simply allowing both versions, leaving no invalid codes
in the alpha VLC.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-02-02 01:12:07 +01:00
Philip Langdale 4c2176d45b swscale: add P016 input support 2017-02-01 14:29:11 -08:00
Lucas Sandery 15d7e31dcb ffplay: allow borderless playback windows
For a pure video tile effect, and enabling better integration of playback windows
into other programs. It would improve the looks in many situations and avoid ugly
hacks like this: http://stackoverflow.com/q/31465630/315024

Signed-off-by: Lucas Sandery <lucas-sandery@users.noreply.github.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-01 22:03:26 +01:00
Michael Niedermayer 0126cd95cc avcodec/ituh263dec: Correct timestamp recovery for B frames
Improves u263_b-frames_5.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 22:01:34 +01:00
Paul B Mahol 71ca855c9d avcodec/wmalosslessdec: remove warning message as bug is fixed
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-01 19:35:24 +01:00
Paul B Mahol c279c44a3a avformat/msf: support codec 1, which is 16 bit pcm le
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-01 19:21:01 +01:00
bnnm c61b28e042 avcodec/atrac3: Add multichannel joint stereo ATRAC3
Multichannel joint stereo simply interleaves stereo pairs (6ch: 2ch + 2ch + 2ch), so each pair is decoded separatedly.

***

To test my changes, I converted examples to wav with ffmpeg.exe (old and new), and compared them to see they are byte-exact.

Regular 2ch files (JS and normal) were straightforward to test.

For multichannel, to check each JS pair is correctly decoded separatedly I did:
- manually demux 6ch.msf into 3 pairs and convert them (2ch_1.wav + 2ch_2.wav + 2ch_3.wav)
- convert the 6ch.msf file to wav (with my changes)
- manually demux the 6ch.wav into 3 pairs (6ch_d1.wav + 6ch_d2.wav + 6ch_d3.wav)
- compare each pair (ex. 2ch_3.wav vs 6ch_d3.wav): all pairs are byte-exact.

The new code just processes each JS pair separatedly, there are no algorithm changes.
It could be improved a bit but I'm not sure about typical styles.
I've only seen 6ch .MSF (probably the AT3 spec only supports 2ch audio).

Signed-off-by: bnnm <bananaman255@gmail.com>
2017-02-01 19:14:12 +01:00
Michael Niedermayer 4f651c723b avcodec/h263: Remove disabled and wrong code from ff_h263_loop_filter()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 19:09:27 +01:00
Michael Niedermayer 901c625494 avcodec/ituh263dec: Use correct error codes in ff_h263_decode_mb()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 19:09:27 +01:00