Commit Graph

92301 Commits

Author SHA1 Message Date
Marton Balint
9344322573 doc/protocols: simplify and clarify UDP localaddr option
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:03:29 +02:00
Marton Balint
ab0812c1a8 avformat/udp: always use IP_ADD_SOURCE_MEMBERSHIP for subscribing to an UDP multicast source group in IPv4
That alone supports specifying the interface based on its address. Getting the
interface index from the local address seems quite a bit of work in a platform
independent way...

Obviously for IPv6 we still always use MCAST_JOIN_SOURCE_GROUP.

As a side effect this also fixes ticket #7459.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:03:29 +02:00
Marton Balint
d3bda871f0 avformat/udp: specify the local address for some source filtered multicast joins
We already use localaddr for the multicast joins without source filters, so we
should use them for source filters as well. This patch only fixes the
IP_ADD_SOURCE_MEMBERSHIP and the IP_BLOCK_SOURCE case.

Unless we do this, the kernel automatically selects an interface based on the
source address, and that interface might be different from the one set in
localaddr. For blocked sources this even casues EINVAL because we joined the
multicast group on a different interface.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:03:29 +02:00
Marton Balint
91a1363452 avformat/udp: add support for generic source filtering
This allows getting data only from a specific source IP. This is useful not
only for unicast but for multicast as well because multicast source
subscriptions do not act as source filters for the incoming packets.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:03:29 +02:00
Marton Balint
9d4829f3c9 avformat/rtpproto: use factorized ip functions
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:03:29 +02:00
Marton Balint
826972c9d8 avformat/udp: use factorized ip functions
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:03:29 +02:00
Marton Balint
45fa756fa4 avformat/ip: factorize some IP filtering and resolving functions to a new file
These are based on the very similar UDP and RTP protocol functions.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-03 22:03:29 +02:00
Paul B Mahol
9e45364a80 avfilter/af_afir: make IR gain control more flexible
For this reason introduce two more options.
2018-10-03 21:43:40 +02:00
Paul B Mahol
4c514edc5b avfilter/avfilter: fix typos in comments 2018-10-03 19:11:52 +02:00
Zhong Li
21733b39d0 lavu/qsv: fix a random hwupload failure regression
Variable 'ret' hasn't been initialized,thus introducing a random
hwupload failure regression due to qsv session uninitialized.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-10-03 11:10:02 +00:00
Michael Niedermayer
f515c978f6 avcodec/rasc: unref both frames on reinit
Fixes: integer overflow
Fixes: inconsistent frame dimensions
Fixes: 10454/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5656301162463232

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-10-03 11:14:40 +02:00
Michael Niedermayer
9a9034958a avcodec/rasc: Fix off by 1 error in vertical coordinate
Fixes: out of array read
Fixes: 10311/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-4856330905452544

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-10-03 11:14:17 +02:00
Michael Niedermayer
c905840e8c avcodec/tiff: check remaining packet size for strips
Fixes: Timeout
Fixes: 10280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5676217211027456

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-10-03 11:13:38 +02:00
Sigga Regina
dcbd89e000 avformat/matroskaenc: reserve free space for metadata on request
Signed-off-by: James Almer <jamrial@gmail.com>
2018-10-01 14:52:35 -03:00
Michael Niedermayer
d702769213 avcodec/scpr: Skip frames which change nothing
Fixes: Timeout
Fixes: 10292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5687943864254464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-30 22:23:02 +02:00
Michael Niedermayer
a8a98ba9ee avcodec/wcmv: Fix integer overflows
Fixes: signed integer overflow: 262140 * 65535 cannot be represented in type 'int'
Fixes: 10090/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5691269368512512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-30 22:23:02 +02:00
Michael Niedermayer
2076e11839 avcodec/gdv: Remove unused variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-30 22:23:02 +02:00
xiaofeng
e78016b04a ffmpeg: break loop when dts_heuristic check done
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-30 22:23:02 +02:00
Karthick Jeyapal
c0ee4e0ac2 avdevice/decklink_dec: add option to align capture start time
This option is useful for maintaining input synchronization across N
different hardware devices deployed for 'N-way' redundancy.
The system time of different hardware devices should be synchronized
with protocols such as NTP or PTP, before using this option.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-30 21:09:12 +02:00
Michael Niedermayer
449b1dcd7d avcodec/hevc_parser: very minor simplification in hevc_parse()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-30 20:08:21 +02:00
Haihao Xiang
4c14a25281 lavc/hevc: Don't parse NAL unit for a dummy buffer
hevc parser mistakenly reports the following message if a dummy buffer
is padded for EOF

   [hevc @ 0x559b63848610] missing picture in access unit

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Reviewed-by: "Li, Zhong" <zhong.li@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-30 20:08:21 +02:00
Marton Balint
b577153231 avcodec/libzvbi-teletextdec: add formatted ass output
Inspired by the VideoLAN text decoder and its port to FFmpeg made by Aman
Gupta.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-30 01:10:23 +02:00
Michael Niedermayer
179ed2d2e0 avcodec/diracdec: check that GetBitContext has not ended in codeblock()
Fixes: Timeout (part 2 of 2)
Fixes: 9774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5748957085958144

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:35:12 +02:00
Michael Niedermayer
7274d849cc avcodec/diracdec: Propagate errors from codeblock()
Consider a component to be damaged if more than 50% of its subbands are damaged

Fixes: Timeout (part 1 of 2)
Fixes: 9774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5748957085958144

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:35:09 +02:00
Michael Niedermayer
db6af88cd0 avcodec/bintext: Use ff_get_buffer instead of ff_reget_buffer and simplify
reget seems unneeded and it is slower

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:33:48 +02:00
Michael Niedermayer
8db9097308 avcodec/bintext: Check input size before allocating the input image
Fixes: Timeout
Fixes: 9795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XBIN_fuzzer-5768631928487936

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:33:42 +02:00
Michael Niedermayer
35517e3ca7 avcodec/gdv: Error out if we had insufficent input for the output frame in decompress_2()
Fixes: Timeout (with the previous commits to gdv.c)
Fixes: 9422/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5143490001371136

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Michael Niedermayer
510bd61941 avcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Michael Niedermayer
6a4788e7b3 avcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Michael Niedermayer
5f84fbce08 avcodec/gdv: Eliminate 50% of the reads in the first inner loop in rescale()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Michael Niedermayer
d021729efc avcodec/gdv: Simplify first inner loop in rescale()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Michael Niedermayer
6228ce0a33 avcodec/gdv: Combine first and 3rd case in rescale()
Simplifies code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Michael Niedermayer
a423970511 avcodec/gdv: Factor terms out of inner loops in rescale()
This also replaces some loops by memcpy()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Michael Niedermayer
b90d8cc746 avcodec/gdv: Replace divisions by shifts in rescale()
Divisions tend to be slower than shifts unless the compiler optimizes them out.
And some of these are in inner loops.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-28 01:25:17 +02:00
Carl Eugen Hoyos
303439bc5f lavf/mpeg: Support demuxing HEVC in mpeg-ps. 2018-09-27 23:53:21 +02:00
Mark Thompson
476a77128a lavc: Add AV1 metadata bitstream filter
Can adjust colour and timing information.
2018-09-26 23:41:34 +01:00
Mark Thompson
c8c81ac502 lavc: Add coded bitstream read/write support for AV1 2018-09-26 23:27:53 +01:00
Paul B Mahol
5ee4144701 avfilter/af_afftdn: add missing break 2018-09-26 22:23:28 +02:00
James Almer
819e4e7979 avformat/matroskaenc: reindent after the previous commit
Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-26 15:17:14 -03:00
James Almer
8439656503 avformat/matroskaenc: refactor checks for allowed codecs in WebM
Use the new ff_webm_codec_tags[] array for this purpose.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-26 15:17:14 -03:00
James Almer
794079e815 avformat/matroskaenc: implement AVOutputFormat.query_codec for webm
Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-26 15:17:13 -03:00
James Almer
14ac62f9af avformat/matroskaenc: remove unnecessary additional codec tags
They are listed in riff.c already.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-26 15:17:13 -03:00
Paul B Mahol
efb65abedf avfilter: add audio denoising (afftdn) filter 2018-09-25 19:54:06 +02:00
Matthieu Bouron
e294b5cf64 RELEASE: update for git after 4.0 branchpoint 2018-09-25 17:29:24 +02:00
Paul B Mahol
d6e50e0716 avfilter/vf_curves: add planar rgb support 2018-09-25 16:35:29 +02:00
Steven Liu
bb660800a5 avformat/utils: move mkdir_p to utils
Because it will be used by avformat/segment.c or other module which
need to automatically create sub-directories operation.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-09-25 21:57:49 +08:00
Steven Liu
a7429d853d avfilter/buffersink.h: fix comment typo of av_buffersink_get_samples
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-09-25 11:11:37 +08:00
Mark Thompson
74b4134d2f vaapi_encode_h265: Add missing error return
Fixes CID #1439657.
2018-09-24 23:09:45 +01:00
Mark Thompson
1215fbad96 lavc/h265_profile_level: Fix level guessing with no PTL structure
Fixes CID #1439661.
2018-09-24 23:09:45 +01:00
Mark Thompson
feb1cf08ab lavc/h265_profile_level: Avoid integer overflow in bitrate
Fixes CIDs #1439659 and #1439660.
2018-09-24 23:09:45 +01:00