Commit Graph

89998 Commits

Author SHA1 Message Date
Michael Niedermayer 76cc0f0f67 avcodec/utvideodec: Add several out of array read related checks
Fixes: OV_decode_plane.avi

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 03:04:48 +01:00
Michael Niedermayer 66acb63028 avcodec/pafvideo: Check allocated frame size
Fixes: OOM
Fixes: 5549/clusterfuzz-testcase-minimized-5390553567985664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 02:49:15 +01:00
Michael Niedermayer 0fb33a8289 avcodec/scpr: Fix reading a pixel before the first
Fixes: 5540/clusterfuzz-testcase-minimized-6122458273808384

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 02:49:15 +01:00
Nekopanda 8b154cb3e9 avcodec/mpeg2dec: Fix field selection for skipped macroblocks
For B field pictures, the spec says,

> The prediction shall be made from the field of the same parity as the field being predicted.

I did it.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 02:16:40 +01:00
Jan Ekström 063be4fe2c lavf/aptxdec: fix the limit on the APTX demuxer definition
Fixes breakage with --disable-muxers as it was originally limited
to the muxer, and not the demuxer.
2018-02-10 18:20:18 +02:00
Aurelien Jacobs 3e21f285cc MAINTAINERS: add myself for aptx.c 2018-02-10 16:53:43 +01:00
Xiaohan Wang dd5208aaf5 avformat/mov: Fix ctts_index calculation
An index should never be equal to the count. Hence we must make sure
*ctts_index < ctts_count.

Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-10 03:57:13 +01:00
Muhammad Faiz 909e00ae81 avformat/format: temporarily use old next api
Should fix https://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225066.html

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-10 07:23:41 +07:00
Mark Thompson 10bcc41bb4 examples: Don't call deprecated functions which don't do anything 2018-02-09 21:38:42 +00:00
Aurelien Jacobs c69054fa24 aptx: indentation (cosmetics only) 2018-02-09 22:10:56 +01:00
Aurelien Jacobs d8258489c8 aptx: add raw muxer and demuxer for aptX HD 2018-02-09 22:10:55 +01:00
Aurelien Jacobs 6fd110a094 aptx: implement the aptX HD bluetooth codec 2018-02-09 22:10:55 +01:00
Aurelien Jacobs 96b217f5e8 aptx: do some clipping to match original codec in extreme cases 2018-02-09 22:10:55 +01:00
Aurelien Jacobs fea8e119a2 aptx: factorize FFABS calculation 2018-02-09 22:10:55 +01:00
Aurelien Jacobs b7915f8a14 aptx: simplify by pre-calculating factor_max 2018-02-09 22:10:55 +01:00
Muhammad Faiz 81d6501be7 checkasm/Makefile: add EXTRALIBS-swresample
Should fix https://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225058.html

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-09 17:50:44 +07:00
Muhammad Faiz 5a2abf00f1 avcodec/codec_desc: sort codec_descriptors
Use bsearch on avcodec_descriptor_get().

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-09 17:39:01 +07:00
sfan5 e752da5464 dashdec: Support SegmentTimeline inside Period
Reviewed-by: Steven Liu <lq@onvideo.cn>
2018-02-09 10:54:24 +08:00
Michael Niedermayer 08c220d26c avcodec/huffyuvdec: Check input buffer size
Fixes: Timeout
Fixes: 5487/clusterfuzz-testcase-4696837035393024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-09 03:01:30 +01:00
James Almer cb97400f93 Revert "cmdutils: make use of new iteration APIs"
This reverts commit cdc78058c7.

It introduced several issues in the command line tools, and it's
implementing a new API that may still see some changes.
Revert for the time being until the state of the API is defined.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-08 13:20:36 -03:00
Michael Niedermayer ddd851f7cb avcodec: Document that init_static_data() is not intended for time consuming operations.
Reviewed-by: Muhammad Faiz <mfcc64@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-08 04:42:40 +01:00
James Almer 3f0a41367e doc/APIchanges: mention a few more recently introduced and deprecated functions
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-07 17:06:04 -03:00
James Almer 9d8fb095e6 doc/APIchanges: fix a recent depreacted function name
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-07 16:56:47 -03:00
James Almer cf666651b4 avformat: fix stream_segment muxer build dependencies
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-07 16:42:11 -03:00
Richard Shaffer 651d5f9639 avformat/hls: Support metadata updates from subdemuxers
If a subdemuxer has the updated metadata event flag set, the metadata is copied
to the corresponding stream. The flag is cleared on the subdemuxer and the
appropriate event flag is set on the stream.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2018-02-07 12:33:37 +01:00
Rostislav Pehlivanov 33d632d40e lavfi: add a gitignore file for OpenCL compiled kernels
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-02-07 11:25:58 +00:00
James Almer 8318bf1751 avformat/fifo_test: remove network.h include
It's not needed, and fixes compilation with network disabled.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-07 00:30:00 -03:00
James Almer e8323c42c1 doc/APIChanges: fix lavu version numbers in a few recent entries
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-06 23:49:13 -03:00
James Almer 36c85d6e77 api: add missing version bumps and APIChanges entries
avcodec bump missed in 7e8eba2d87
avformat bump missed in ff46124b0d and
0694d87024
avdevice bump missed in 0fd475704e

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-06 23:43:01 -03:00
James Almer f7aacf4ab7 avformat/mov: add VP8 codec support
Demuxing only. Muxing is disabled as altref frame handling is not
defined in the spec, and there's no way to know the presence of
such frames during stream initialization.

Based on a patch by Steven Liu.

Fixes ticket #7000

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-06 23:08:42 -03:00
James Almer 8885a29e5d avformat/Makefile: fix fifo and fifo_test muxer build objects
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-06 20:02:23 -03:00
Michael Niedermayer 8f6a71f7f1 avformat/bintext: Implement bin_probe()
Fixes misdetection of sbQ9.bin

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-06 23:07:10 +01:00
Jérôme Martinez 698d5eb5bf avcodec/ffv1: Support for RGBA64 and GBRAP16
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-06 23:07:10 +01:00
Menno 204c7caf0d avcodec/libopus: support disabling phase inversion.
Signed-off-by: Menno <mrdegier@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-06 23:07:10 +01:00
Josh de Kock 26d879c1ce lavc/bsf: make BSF iteration the same as other iterators 2018-02-06 18:57:43 +00:00
Josh de Kock cdc78058c7 cmdutils: make use of new iteration APIs 2018-02-06 18:57:43 +00:00
Josh de Kock 0fd475704e lavd: add new API for iterating input and output devices
This also adds an avpriv function to register devices in
libavformat
2018-02-06 18:57:42 +00:00
Josh de Kock 0694d87024 lavf: add new API for iterating muxers and demuxers 2018-02-06 18:57:42 +00:00
Josh de Kock 598d5f8579 lavf: move fifo test muxer into separate file
This fixes the fate-fifo-muxer test with the clarified
removal of registering external formats.
2018-02-06 18:57:31 +00:00
Josh de Kock 6197453761 lavf/rtp: replace linked list with array 2018-02-06 18:50:27 +00:00
Josh de Kock 7e8eba2d87 lavc: add new API for iterating codecs and codec parsers
Based on an unfinished patch by atomnuker.
2018-02-06 18:50:27 +00:00
Muhammad Faiz caa4bd7a9f avcodec/me_cmp: remove ff_me_cmp_init_static()
Precalculate and constify ff_square_tab.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-05 22:42:59 +07:00
Michael Niedermayer 118e1b0b33 avcodec/utvideodec: Fix bytes left check in decode_frame()
Fixes: out of array read
Fixes: poc-2017.avi

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-05 02:54:02 +01:00
wm4 48bc9fffd1 id3v2: fix unsynchronization
The ID3v2 "unsynchronization scheme" requires replacing any 0xFF 0x00
sequences with 0xFF. This has to be done on every byte of the source
data, while the current code skipped a byte after a replacement. This
meant 0xFF 0x00 0xFF 00 was translated to 0xFF 0xFF 0x00 instead of 0xFF
0xFF. It feels a bit messy to do this correctly with the avio use. But
fortunately, this translation can be done in-place, so we can just do it
in memory.

Inspired by what taglib does.

Also see 9ae80e6a9c. (The sample file for
that commit is gone, so it could not be retested.)
2018-02-04 15:19:41 +01:00
wm4 ff46124b0d rtsp: rename certain options after a deprecation period
The "timeout" option name inherently clashes with the meaning of the
HTTP libavformat protocol option with the same name. Rename it after a
deprecation period to make it compatible with the HTTP one.
2018-02-04 15:08:48 +01:00
Jun Zhao 0519e66a90 examples: Add a VA-API transcode example.
Usage is:
./vaapi_transcode input_stream codec output_stream
For example:
- ./vaapi_transcode input.mp4 h264_vaapi output_h264.mp4
- ./vaapi_transcode input.mp4 vp8_vaapi output_vp8.ivf

Does not handle resolution changes on the input stream.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-02-04 12:56:39 +00:00
Muhammad Faiz 3caecf7ce8 avcodec: do not use init_static_data on some codecs
They don't modify AVCodec, no needs to call it at register. They will be
wasteful if these codecs are unused. Instead, call static data initialization
at codecs' init.

Benchmark:
old: 51281340 decicycles in avcodec_register_all,       1 runs,      0 skips
new:  6738960 decicycles in avcodec_register_all,       1 runs,      0 skips

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-04 06:11:07 +07:00
Michael Niedermayer 8e50bd61e4 avcodec/wavpack: Fix integer overflow in FFABS
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 5396/clusterfuzz-testcase-minimized-6558555529281536

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-03 21:37:19 +01:00
Nikolas Bowe c86490c49a avfilter/af_join: Fix crash in join filter
Previously if ff_outlink_frame_wanted() returned 0 it could dereference a null pointer when trying to read nb_samples.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-03 21:37:19 +01:00
Jérôme Martinez e3d946b3f4 avcodec/ffv1enc: mark RGB48 support as non-experimental
Remove the 2nd mark, 1st mark was removed in 58e16a4

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-03 00:22:47 +01:00