Commit Graph

96231 Commits

Author SHA1 Message Date
Andreas Rheinhardt
2968da7d9e avformat/matroskaenc: Adapt documentation of put_ebml_num
to its actual behaviour: That it uses the least amount of bytes unless
overridden.

The current documentation leaves it undefined how many bytes will be used
when no number to use has been given explicitly. But several estimates
(used to write EBML Master elements with a small length field) require
this number to be the least amount of bytes to work. Therefore change
the documentation; and remove a comment about writing length fields
indicating "unkown length". It has been outdated since 0580a122.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Andreas Rheinhardt
6d354aeb29 avformat/mpeg: Remove secondary packet for reading VobSub
When vobsub_read_packet() reads a packet, it uses a dedicated AVPacket
to get the subtitle timing and position from an FFDemuxSubtitlesQueue
(which has been filled with this data during reading the idx file in
vobsub_read_header); afterwards the actual subtitle data is read into
the packet destined for output and the timing and position are copied
to this packet. Afterwards, the local packet is unreferenced.

This can be simplified: Simply use the output packet to get the timing
and position from the FFDemuxSubtitlesQueue. The packet's size will be
zero afterwards, so that it can be directly used to read the actual
subtitle data. This makes copying the packet fields as well as
unreferencing the local packet unecessary and also removes an instance
of usage of sizeof(AVPacket) in libavformat.

The only difference is that the returned packet will already be flagged
as a keyframe. This currently only happens in compute_pkt_fields().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Matt Oliver
1fd8929450 compat/avisynth: Fix unicode compilation.
Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-01 16:38:28 +01:00
Paul B Mahol
d4d6280ab2 avfilter/af_dynaudnorm: do not hang forever if only EOF is received 2020-01-01 13:44:22 +01:00
Paul B Mahol
7bb09e57e0 avfilter/af_dynaudnorm: do not error out if even filter size was given
Instead issue a warning and make filter size odd number.
2020-01-01 13:44:22 +01:00
Jun Zhao
d7e2a2bb35 lavf/libsrt: add version guard for srt encryption control
add version guard for srt encryption control. and use
SRTO_STRICTENC(53) for compatibility.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-01 19:35:53 +08:00
Gyan Doshi
7b58702cbd configure: bump year 2020-01-01 12:14:30 +05:30
Michael Niedermayer
a15d904ad7 avcodec: Replace get_bits_long() by get_bits() where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
9a8471e3f0 avformat/oggparsetheora: Replace get_bits_long() by get_bits() where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
e900621074 avformat/oggparseflac: Replace skip_bits_long() by skip_bits() where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
f72fa1ad67 avcodec: Replace skip_bits_long() by skip_bits() where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
79d5d79f38 avcodec: Replace show_bits_long() by show_bits() where possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
fa47f6412d avcodec/ffwavesynth: Fix undefined overflow in wavesynth_synth_sample()
Fixes: signed integer overflow: 2147464192 + 21176 cannot be represented in type 'int'
Fixes: 19042/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5719828090585088

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
89fd76db71 avcodec/cook: Use 3 stage VLC decoding for channel_coupling
Fixes: shift exponent -1 is negative
Fixes: out of array read
Fixes: 19028/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5759766471376896
Fixes: 19037/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5734106625474560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
4cfc563c57 avcodec/options_table: err_detect compliant and aggressive should also enable the weaker checks
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
7d475c53c8 avformat/options_table: err_detect compliant and aggressive should also enable the weaker checks
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
53efab44a9 avcodec/wmalosslessdec: Fixes undefined overflow in dequantization in decode_subframe()
Fixes: signed integer overflow: 47875596 * 45 cannot be represented in type 'int'
Fixes: 19082/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5687766512041984

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
aea6755611 avcodec/sonic: Check e in get_symbol()
Fixes: signed integer overflow: 1721520852 + 1721520852 cannot be represented in type 'int'
Fixes: 18346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5709623893426176
Fixes: 18753/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5663299131932672

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
4dc93ae3d7 avcodec/twinvqdec: Correct overflow in block align check
Fixes: signed integer overflow: 538976288 * 8 cannot be represented in type 'int'
Fixes: 19126/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TWINVQ_fuzzer-5687464110325760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Michael Niedermayer
77ba9e3252 avcodec/h264_ps: Provide more details with "Truncated VUI" Message
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 18:43:50 +01:00
Zhao Zhili
609285af51 fftools/ffmpeg_filter: remove sws_param option from buffersrc
The option is deprecated and ignored by buffersrc.
2019-12-31 14:24:34 +01:00
Michael Niedermayer
c1411a1132 tools/target_dec_fuzzer: Stop negative block_align and sampling rate
These are checked for early in avcodec_open2() and do not really test the decoder
but instead waste resources which could be better spend fuzzing the actual decoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 12:37:47 +01:00
Zhao Zhili
f78dc66089 avcodec/utils: remove access of AV_SAMPLE_FMT_NB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 12:37:47 +01:00
Zhao Zhili
1e3e547a5b swscale/utils: remove access of AV_PIX_FMT_NB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31 12:37:47 +01:00
Marton Balint
f1353ce222 avdevice/xcbgrab: capture the full desktop if video_size is not specified
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-30 23:32:27 +01:00
Marton Balint
f6845269c6 avdevice/xcbgrab: fix packet timestamps
Since 648b8cca6c and
c991e9cd91 timestamps were not set properly.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-30 21:09:24 +01:00
Paul B Mahol
f651b18c19 avfilter/vf_histogram: add envelope to thistogram filter 2019-12-30 17:21:35 +01:00
Zhao Zhili
b2491566a6 avfilter/buffersrc: deprecate sws_param option 2019-12-30 10:41:07 +01:00
Paul B Mahol
e20c6d95b2 avfilter/af_crystalizer: add support for commands 2019-12-29 15:33:55 +01:00
Paul B Mahol
22d3552f44 avfilter/af_crystalizer: add timeline support 2019-12-29 15:33:55 +01:00
Paul B Mahol
26eba8ca61 avfilter/vf_waveform: add support for 12bit yuva formats 2019-12-29 15:33:55 +01:00
Paul B Mahol
11f6657e92 avfilter/vf_vectorscope: add support for 12bit yuva formats 2019-12-29 15:33:55 +01:00
Paul B Mahol
612b5791b8 avfilter/vf_histogram: add support for 12bit yuva formats 2019-12-29 15:33:55 +01:00
Paul B Mahol
d3d6f5a76e avfilter/vf_histogram: reindent after previous commit 2019-12-29 15:33:55 +01:00
Paul B Mahol
cc43c2f29a avfilter: add thistogram video filter 2019-12-29 15:33:55 +01:00
Zhong Li
755ad01dd1 lavc/qsv: remove the unused funtion ff_qsv_profile_to_mfx()
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-12-29 20:23:07 +08:00
Zhong Li
779951f7b2 lavc/qsvdec: disable gpu copy when not supported
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-12-29 20:23:07 +08:00
Zhong Li
9fff5c40a7 lavc/qsvdec: fix the error retrun code in ff_qsv_get_continuous_buffer()
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-12-29 20:23:07 +08:00
Andreas Rheinhardt
2ff687c17f avformat/matroskadec: Fix lzo decompression
When a Matroska Block is only stored in compressed form, the size of
the uncompressed block is not explicitly coded and therefore not known
before decompressing it. Therefore the demuxer uses a guess for the
uncompressed size: The first guess is three times the compressed size
and if this is not enough, it is repeatedly incremented by a factor of
three. But when this happens with lzo, the decompression is neither
resumed nor started again. Instead when av_lzo1x_decode indicates that x
bytes of input data could not be decoded, because the output buffer is
already full, the first (not the last) x bytes of the input buffer are
resent for decoding in the next try; they overwrite already decoded
data.

This commit fixes this by instead restarting the decompression anew,
just with a bigger buffer.

This seems to be a regression since 935ec5a1.

A FATE-test for this has been added.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-28 22:40:13 -03:00
Andreas Rheinhardt
6c735b96ee fate/matroska: Add test for ProRes and bz2 compression
This test tests that demuxing ProRes that is muxed like it should be in
Matroska (i.e. with the first header ("icpf") atom stripped away) works;
it also tests bz2 decompression as well as the handling of
unknown-length clusters.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-28 22:40:13 -03:00
James Almer
eb17a7906b avfilter/vf_vectorscope: use av_clip_uint8()
Fixes fate-source

Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-28 22:38:58 -03:00
Paul B Mahol
6399eed48a avfilter/vf_waveform: implement tint options 2019-12-28 21:51:40 +01:00
Paul B Mahol
b3216f13ce avfilter/vf_vectorscope: improve tint output for gbrp formats 2019-12-28 21:51:40 +01:00
Carl Eugen Hoyos
2e700ec3a7 fftools/ffmpeg_opt: Add a missing closing brackets.
Fixes ticket #8447.
2019-12-28 20:11:01 +01:00
Paul B Mahol
2736dc0564 avfilter/vf_vectorscope: rename gray mode to tint mode 2019-12-28 14:01:15 +01:00
Paul B Mahol
29b765d657 avfilter/vf_vectorscope: add invert graticule 2019-12-28 12:32:43 +01:00
Paul B Mahol
1669c970b1 avfilter/vf_vectorscope: use enum for graticule items 2019-12-28 12:32:43 +01:00
Michael Niedermayer
5c0d1f7896 avfilter/vf_geq: Add support for reading sample sums and means of rectangles
This allows integrating box blur style filters in geq.

Without this computing the mean of an area in geq would have been excessivly slow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-28 11:20:48 +01:00
Michael Niedermayer
47fd73ace2 avfilter/vf_geq: Add NB_PLANES
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-28 11:20:48 +01:00
Michael Niedermayer
45259a0ee4 avutil/eval: Add av_expr_count_func() similar to av_expr_count_vars()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-28 11:20:48 +01:00