Commit Graph

89848 Commits

Author SHA1 Message Date
Michael Niedermayer 2eecf3cf8e avcodec/snowdec: Fix integer overflow before htaps check
Fixes: runtime error: signed integer overflow: -1094995529 * 2 cannot be represented in type 'int'
Fixes: 4828/clusterfuzz-testcase-minimized-5100849937252352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-20 21:32:04 +01:00
Michael Niedermayer 725353525e avcodec/ulti: Check number of blocks at init
Fixes: Timeout
Fixes: 4832/clusterfuzz-testcase-4699096590843904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-20 21:32:04 +01:00
Nikolas Bowe ef5994e09d avformat/lrcdec: Fix memory leak in lrc_read_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-20 21:32:04 +01:00
Henrik Gramner 6f62b0bd4f x86inc: Drop cpuflags_slowctz 2018-01-20 19:23:37 +01:00
Henrik Gramner eb5f063e7c x86inc: Correctly set mmreg variables 2018-01-20 19:23:37 +01:00
Henrik Gramner 6b6edd1216 x86inc: Support creating global symbols from local labels
On ELF platforms such symbols needs to be flagged as functions with the
correct visibility to please certain linkers in some scenarios.
2018-01-20 19:23:37 +01:00
Henrik Gramner 9e4b3675f2 x86inc: Use .rdata instead of .rodata on Windows
The standard section for read-only data on Windows is .rdata. Nasm will
flag non-standard sections as executable by default which isn't ideal.
2018-01-20 19:23:37 +01:00
Henrik Gramner 3a02cbe3fa x86inc: Enable AVX emulation for floating-point pseudo-instructions
There are 32 pseudo-instructions for each floating-point comparison
instruction, but only 8 of them are actually valid in legacy-encoded mode.
The remaining 24 requires the use of VEX-encoded (v-prefixed) instructions
and can therefore be disregarded for this purpose.
2018-01-20 19:23:37 +01:00
Devin Heitmueller b5b4868504 avdevice/decklink: Fix compilation of module on OSX
Clang applies the missing-prototypes warning on C++ files, whereas
gcc only applies it to C.  As a result, the decklink_common.cpp file
fails to build because of missing prototypes in DecklinkDispatch.cpp
(which is #included by decklink_common.cpp).

We don't want to change the actual Blackmagic SDK sources, so
suppress the warning just for that one #include.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:29 +01:00
Devin Heitmueller 5409f065f2 avdevice/decklink: Suppress warning about misuse of struct instead of class
When building with Clang, the following warning is shown:

warning: struct 'IDeckLinkVideoFrame' was previously declared as a
class [-Wmismatched-tags]

The function incorrectly casts IDeckLinkVideoFrame as a struct
instead of a class pointer.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:29 +01:00
Vishwanath Dixit fc93eca126 avdevice/decklink: addition of absolute wallclock option for pts source
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:27 +01:00
Vishwanath Dixit dfa2523bdd avdevice/decklink: addition of PTS_SRC_NB in enum DecklinkPtsSource
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:29:56 +01:00
Vishwanath Dixit 7c27bbd590 avdevice/decklink: addition of copyts option
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:29:56 +01:00
Marton Balint e3acba0d5d avfilter/formats: remove support for deprecated channel count specification
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:07:44 +01:00
Carl Eugen Hoyos 7652af9df0 lavf/swfdec: Reduce score when auto-detecting swf files.
Not more than 32bit are tested.
2018-01-20 15:41:40 +01:00
Yogender Gupta 07a96b6251 avcodec/cuviddec: set key frame for decoded frames
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-19 23:30:14 +01:00
Nikolas Bowe e07649e618 avformat/matroskadec: Fix float-cast-overflow undefined behavior in matroska_parse_tracks()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-19 22:33:31 +01:00
Karthick Jeyapal 0afa171f25 avformat/hlsenc: Add CODECS attribute to master playlist 2018-01-19 17:03:09 +08:00
Rodger Combs 381a4820c6 lavfi/vf_scale_vaapi: set output SAR 2018-01-18 19:18:33 -06:00
James Almer fb3fd4d506 fate: update filter-acrossfade test reference file
<jamrial> durandal_1707: 8088b5d69c broke the acrossfade test
<@durandal_1707> jamrial: there was test?
<jamrial> durandal_1707: fate-filter-acrossfade
<@durandal_1707> what broke?
<jamrial> what used to be one frame is now two
<@durandal_1707> ahh, just update test

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-18 19:12:50 -03:00
James Almer 4f6b34f1f8 avformat: small AVFormatContext doxy cosmetics
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-18 13:00:25 -03:00
Paul B Mahol 8088b5d69c avfilter/af_afade: acrossfade: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-18 16:26:14 +01:00
James Almer 1b5d3c08e3 avformat: small cosmetics after 6512ff72f9
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-17 19:39:33 -03:00
Gyan Doshi e1e89c0695 avfilter/vidstab: check bytesPerPixel only for packed formats.
libvidstab introduced this variable only for packed formats but in
vf_vidstab*.c, it's checked for all inputs. So the filter errors out for YUV422/444P streams.

Fixes #6736.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-17 20:02:14 +01:00
Jun Zhao 383804edd8 lavfi/deinterlace_vaapi: fix can't show full option information.
use ffmpeg -h filter=deinterlace_vaapi can't get full help information,
the root cause is not setting the flags fileld in options.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-17 20:02:14 +01:00
Mark Thompson 96cf0d8a9c Merge commit 'cbe28bc069dde1d53d937ee10700bb123279c7c8'
* commit 'cbe28bc069dde1d53d937ee10700bb123279c7c8':
  qsv: better to use alignment by 16 and HEVC 10b requires alignment by 32

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 23:29:36 +00:00
Mark Thompson 3895fce26e Merge commit '34c113335b53d83ed343de49741f0823aa1f8cc6'
* commit '34c113335b53d83ed343de49741f0823aa1f8cc6':
  Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK

Most of this was already present from 9ea6607d29,
this just applies some minor fixups and adds the general documentation.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 23:25:27 +00:00
Mark Thompson 68de778ccc Merge commit '7b0b5bc810cdb9ef100492c9a9f2d30602c04336'
* commit '7b0b5bc810cdb9ef100492c9a9f2d30602c04336':
  cmdutils: update copyright year to 2018

This commit is a noop, see bddf31ba75

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 23:01:20 +00:00
Mark Thompson 725ae0e2d0 Merge commit '1efbbfedcaf4a3cecab980273ad809ba3ade2f74'
* commit '1efbbfedcaf4a3cecab980273ad809ba3ade2f74':
  examples/qsvdec: do not set the deprecated field refcounted_frames

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 22:57:09 +00:00
Mark Thompson d204b7ff61 Merge commit 'e23190269fb6e8217d080918893641ba3e0e3556'
* commit 'e23190269fb6e8217d080918893641ba3e0e3556':
  lavu/qsv: add log message for libmfx version

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 22:57:02 +00:00
Jun Zhao a919ab853e lavc/snow_dwt: add struct MpegEncContext to fix headers check.
add missing struct MpegEncContext, use make checkheaders
found this warning.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-16 22:02:34 +01:00
wm4 27b9f82e2c hwcontext_d3d11va: implement av_hwdevice_get_hwframe_constraints()
D3D11 has rather fine grained per format capabilities for different uses
that can be queried at runtime. Since we don't know what the user wants
to do with the formats when av_hwdevice_get_hwframe_constraints() is
called, we simply return all formats that have the most basic support.
2018-01-16 17:40:24 +01:00
wm4 631c56a8e4 avformat: make avformat_network_init() explicitly optional
It was sort of optional before - if you didn't call it, networking was
initialized on demand, and an ugly warning was logged. Also, the doxygen
comments threatened that it would be made strictly required one day.

Make it explicitly optional. I would prefer to deprecate it fully, but
there might still be legitimate reasons to use this. But the average
user won't need it.

This is needed only for two reasons: to initialize TLS libraries like
OpenSSL and GnuTLS, and winsock.

OpenSSL and GnuTLS were already silently initialized on demand if the
global network init function was not called. They also have various
thread-safety acrobatics, which make concurrent initialization within
libavformat safe. In addition, the libraries are moving towards making
their global init functions safe, which removes all need for central
global init. In particular, GnuTLS 3.5.16 and OpenSSL 1.1.0g have been
found to have safe init functions. In all cases, they use internal
reference counters to avoid that the global uninit functions interfere
with concurrent uses of the library by other API users who called global
init.

winsock should be thread-safe as well, and maintains an internal
reference counter as well.

Since we still support ancient TLS libraries, which do not have this
fixed, and since it's unknown whether winsock and GnuTLS
reinitialization is costly in any way, don't deprecate the libavformat
functions yet.
2018-01-16 12:57:04 +01:00
wm4 6512ff72f9 avformat: deprecate another ffserver API leftover 2018-01-16 12:54:53 +01:00
Michael Niedermayer 83e34ae3c2 avcodec/wavpack: Fix integer overflows in wv_unpack_stereo / mono
Fixes: runtime error: signed integer overflow: 2146276249 + 1487583 cannot be represented in type 'int'
Fixes: 4823/clusterfuzz-testcase-minimized-4551896611160064

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-15 19:55:22 +01:00
Michael Niedermayer 6887e41243 avcodec/jpeg2000: Check sum of sizes of band->prec before allocating
Fixes: OOM
Fixes: 4810/clusterfuzz-testcase-minimized-6034253235093504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-15 19:55:22 +01:00
Michael Niedermayer a1f38c7589 avcodec/ac3dec_fixed: Fix integer overflow in scale_coefs()
Fixes: runtime error: signed integer overflow: 2147483520 + 128 cannot be represented in type 'int'
Fixes: 4800/clusterfuzz-testcase-minimized-6110372403609600

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-15 19:55:22 +01:00
wm4 cbbb206734 hwcontext_vdpau: implement av_hwdevice_get_hwframe_constraints()
In addition, this does not allow creating frames contexts with sw_format
for which no known transfer formats exist. In theory, we should check
whether the chroma format (i.e. the sw_format) is supported at all by
the vdpau driver, but checking for transfer formats has the same effect.

Note that the pre-existing code adds 1 to priv->nb_pix_fmts[i] for
unknown reason, and some checks need to account for that to check for
empty lists. They are not off-by-one errors.
2018-01-15 12:37:30 +01:00
wm4 43e1ccfea1 http: cosmetics: reformat reconnect check for better readability
The condition was a bit too long, and most editors will break the line
and turn it into an unreadable mess. Move out some of the conditions.

This should not change the behavior.
2018-01-15 12:37:30 +01:00
Robert Nagy 856b7cae9f avfilter/vf_idet: added more YUVA formats to idet query_formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-14 23:19:01 +01:00
sfan5 57dbabd9c1 dashdec: Support SegmentTemplate inside Period
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 23:02:26 +08:00
sfan5 01d74c4055 dashdec: Avoid trying to read any segments beyond the last
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 23:01:45 +08:00
sfan5 74b143d81f dashdec: Correct seeking behaviour
dash_read_seek() is called only once to issue a seek
of *all* streams to the specified timestamp. But to
avoid reopening each stream, do a "dry run" for streams
that are in a discarded state.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 22:36:02 +08:00
sfan5 bb0cc2e7bd dashdec: Search for segment timeline inside AdaptionSets too 2018-01-14 22:35:31 +08:00
sfan5 94cc16499f dashdec: Support for multiple video/audio streams
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 22:34:43 +08:00
sfan5 66e551eafb dashdec: Expose bandwidth and representation ID as metadata
The primary goal was making it viable to play YouTube/Vimeo/... videos
using the native demuxer, since mpv currently uses a workaround in form
of Edit Decision Lists (EDL).

Implemented features:

1 Exposing id / bitrate as stream metadata (similar to the HLS demuxer)
2 Support for multiple video and audio streams
3 A few minor parts of the specification that are in use at YouTube

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 22:33:57 +08:00
Gyan Doshi 96f94624e0 avformat/adtsenc: allow only AAC streams
The ADTS muxer will silently (attempt to) mux any audio stream passed to it.
Patch adds a codec check.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-14 09:57:51 -03:00
James Almer 02dba49dd3 avformat/adtsenc: add adts_init()
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-14 09:57:42 -03:00
Rostislav Pehlivanov c51301db14 dcaenc: move all tables inside context and fix incorrect coding style
Functionally identical to the old code, with less lines wasted.
Partially fixes the complete disregard for the 80 col/line guide.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-13 18:37:54 +00:00
Daniil Cherednik ec6e389c75 avcodec/dcaenc: Use ffmpeg mdct instead of own implementation
Signed-off-by: Daniil Cherednik <dan.cherednik@gmail.com>
2018-01-13 18:13:58 +00:00