1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

90176 Commits

Author SHA1 Message Date
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
Diego Biurrun
fd36cf6bf6 configure: Factorize check_64_bit() 2018-02-06 11:13:19 +01:00
Diego Biurrun
38434a9ff5 configure: Simplify restrict keyword handling
Skip a variable indirection and only redefine restrict if necessary.
2018-02-06 11:13:10 +01:00
Diego Biurrun
4cf84e254a Drop some unnecessary config.h #includes 2018-02-06 10:03:15 +01:00
Diego Biurrun
bca41545b3 configure: Group code that sets the license string with licensing checks
This also moves the setting of the licensing string out of a block that
is skipped when quiet operation is requested.
2018-02-06 10:03:15 +01: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
Mark Thompson
2eb396b175 hwcontext: Fix memory leak on derived frame allocation failure 2018-02-04 13:47:25 +00:00
Jun Zhao
96e476cc9d hwcontext: Fix documentation for av_hwdevice_ctx_alloc()
From ffmpeg commit 9365dfcbf6.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-02-04 13:47:19 +00: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
James Almer
94eb5505ad ffprobe: remove usage of deprecation warning removal pragmas
Fixes compilation in non Windows targets.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-02 17:51:24 -03:00
Zhong Li
19b1d905b8 ffprobe: Initialize coded_width/height
coded_width/height are unnitialized and will be overwritten by
dec_ctx->width/height in avcodec_open2()

This fixes tiket #6958.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-02 16:40:40 -03:00
Calvin Walton
108958e43d librsvgdec: Fix frame clearing code
The existing code attempts to clear the frame by painting in OVER
mode with transparent black - which is a no-op. As a result if you
have many input frames (e.g. you're using a sequence of svg files),
you'll start to see new frames drawn over old frames as memory gets
re-used.

Switch the code to paint using the CLEAR compositing operator,
which fills every channel with 0 values (setting a source colour
is not required).
2018-02-02 15:36:21 +00:00
Richard Shaffer
4be6307cbf fate: add id3v2 test
Adds basic unit test for parsing ID3v2 tags.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-02 12:16:56 -03:00
Xiaohan Wang
caaa40d2c6 configure: Remove carriage return ('\r') in Windows CC_IDENT
Currently the Windows CC_IDENT is ended with '\r\n'. "head -n1" will not
remove the '\r' and this is causing building error in Chromium.

This CL adds "tr -d '\r'" to remove '\r' in the CC_IDENT string. Since in
most cases '\r' only appears at the end of a string/line, this should
work in most cases.

See example:

printf "hello\r\nworld\r\n" | head -n1 | hd
00000000  68 65 6c 6c 6f 0d 0a                              |hello..|

printf "hello\r\nworld\r\n" | head -n1 | tr -d '\r' | hd
00000000  68 65 6c 6c 6f 0a                                 |hello.|

Also note a similar previous change at:
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2013-October/069950.html

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-02 00:18:24 +01:00
Michael Niedermayer
b1bef755f6 avcodec/aacsbr_fixed: Fix overflows in rounding in sbr_hf_assemble()
Fixes: runtime error: signed integer overflow: 2052929346 + 204817098 cannot be represented in type 'int'
Fixes: 5275/clusterfuzz-testcase-minimized-5367635958038528

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-02 00:18:24 +01:00
Michael Niedermayer
0a2560a977 avcodec/exr: Fix memleaks in decode_header()
Fixes: 4793/clusterfuzz-testcase-minimized-5707366629638144

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-02 00:18:24 +01:00
Martin Storsjö
8965e2af92 avpacket: Initialize the allocated padding area in side data
This makes sure that consumers of the side data actually can
rely on the padding as intended, without having the callers of
av_packet_new_side_data to explicitly zero initialize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2018-02-01 15:50:00 +02:00
Steven Liu
b1af0e23a3 avformat/hls: store referer message in HLS http request
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-02-01 10:57:29 +08:00
Steven Liu
44f3430674 avformat/http: add referer option into http
add Referer message if referer have been set.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-02-01 10:56:51 +08:00
Steven Liu
27fe8930e0 avfilter: add comments for duplicate line
comment about the looks like a duplicate line.
but that is used to reason x is expressed from y

Suggested-by: Paul B Mahol
Suggested-by: Michael Niedermayer
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-02-01 10:55:19 +08:00
Rostislav Pehlivanov
61a4ee8ab4 avcodec/vc2enc: prevent bitrate overshoots
The rounding caused by the size scaler wasn't compensated for and the
slice sizes grew beyond what is allowed per frame.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2018-01-31 17:29:45 +01:00
Sean McGovern
5085f25ace vc1: skip motion compensation when data for last picture is invalid
Bug-Id: 1101
Cc: libav-stable@libav.org
2018-01-30 19:04:07 -05:00
Michael Niedermayer
fe1e6c06d0 avcodec/dirac_dwt: Fix several integer overflows
Fixes: runtime error: signed integer overflow: -2146071175 + -268479557 cannot be represented in type 'int'
Fixes: 5237/clusterfuzz-testcase-minimized-4569895275593728

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-30 22:08:32 +01:00
Michael Niedermayer
2ff9f17851 avcodec/indeo5: Do not leave frame_type set to an invalid value
Fixes: null pointer dereference
Fixes: 5264/clusterfuzz-testcase-minimized-4621956621008896

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-30 22:08:32 +01:00
Michael Niedermayer
4a75a75c62 avcodec/hevc_ps: Check log2_sao_offset_scale_*
Fixes: 4868/clusterfuzz-testcase-minimized-6236542906400768
Fixes: runtime error: shift exponent 126 is too large for 32-bit 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>
2018-01-30 22:08:32 +01:00
James Almer
782e066e3e avcodec/mediacodecdec: use ff_hevc_ps_uninit()
Fixes memleaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-30 13:15:44 -03:00
James Almer
222d7055e2 avcodec/hevc_parser: use ff_hevc_decode_extradata() to parse extradata
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-30 12:13:20 -03:00
Dale Curtis
42323c3e3a avcodec/mpegaudio_parser: Skip APE tags when parsing mp3 packets.
Otherwise the decoder will throw "Missing header" errors when the
packets are sent for decoding.

This is similar to 89a420b71b.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-30 05:28:22 +01:00
Gyan Doshi
b99e77b9f7 avformat/mpegenc - fix typo in VBV warning
Default VBV buffer size is 230KB, not 130KB.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-30 05:28:22 +01:00
James Almer
0cc3d830d1 avcodec/Makefile: add missing opus.c dependency to opus encoder
Needed for ff_celt_quant_bands and ff_celt_bitalloc.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-30 00:32:27 -03:00
James Almer
ede6e7494f avcodec/mlp_parser: reindent after last commit
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-29 23:09:23 -03:00
James Almer
55ebf707d0 avcodec/mlp_parser: don't try to combine frames when full frames are provided
Attempting full frame reconstruction is unnecessary for non raw
containers, so just skip it altogether.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-29 23:09:22 -03:00
James Almer
63b5d04e33 avformat/matroskadec: force full frame parsing of MLP/TrueHD streams
There's at least one known file with a TrueHD stream that hasn't
been correctly muxed, and requires full frame parsing and repack.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-29 23:09:08 -03:00
Michael Niedermayer
d4967c04e0 avcodec/mpeg4videodec: Avoid possibly aliasing violating casts
Found-by: kierank
Reviewed-by: Kieran Kunhya <kieran618@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-29 04:11:28 +01:00