Paul B Mahol
a97cad8b0b
avcodec/amrnbdec: move channel_size bellow to avoid array overreads
2021-10-03 12:13:53 +02:00
Paul B Mahol
17130321f3
avcodec/mlpdec: skip decoding substreams if their channels are not to be used
2021-10-03 11:46:53 +02:00
Paul B Mahol
114634a51a
avcodec/mlpdec: update matrix encoding only if it changed
2021-10-03 11:46:53 +02:00
Paul B Mahol
d2cf2cb0bd
avcodec/amr*dec: reindent
2021-10-03 11:42:15 +02:00
Paul B Mahol
f282c34c00
avcodec/amr*dec: add multichannel support
2021-10-03 11:42:15 +02:00
Wu Jianhua
e26c4d252f
avfilter/x86/vf_blend: unify indentation format
...
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com >
2021-10-03 09:15:55 +02:00
Paul B Mahol
db7bd99ebf
avfilter/f_reverse: add missing S64(P) sample format support
2021-10-02 18:49:40 +02:00
Paul B Mahol
ba63078b0f
avfilter: add (a)latency filters
2021-10-02 18:49:40 +02:00
Paul B Mahol
1f447fd954
avcodec: add amr parser
2021-10-02 18:49:40 +02:00
Andreas Rheinhardt
8ae0ef5327
avcodec/vc1_pred: Remove unused function parameter
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 18:35:35 +02:00
Andreas Rheinhardt
98f52efbfa
avcodec/mpegaudiodec_template: Remove unused variable
...
Unused since 9ab0874ea8
.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 18:35:16 +02:00
Andreas Rheinhardt
9e7e34ebcb
avformat/lrcenc: Remove unnecessary header
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 18:34:35 +02:00
Andreas Rheinhardt
d15efbdd5e
fftools/ffmpeg_opt: Remove write-only variable
...
Unused since 6b35a83214
(the removal of
ffserver).
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 18:34:35 +02:00
Andreas Rheinhardt
2b2e9afdd2
avformat/(lrc|scc)enc: Use avio_w8() to write a single char
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:16:34 +02:00
Andreas Rheinhardt
8766361fc1
avformat/subtitles: Honour ff_subtitles_read_line() documentation
...
It claims to always zero-terminate its buffer like snprintf(),
yet it does it not on EOF. Because of this the mcc demuxer
used uninitialized values when reading an empty input file.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:16:29 +02:00
Andreas Rheinhardt
2004d8d36d
avformat/sccdec: Avoid zero-terminating unnecessarily
...
ff_subtitles_queue_insert() does not require its events to be
zero-terminated as it has a parameter for the length.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:16:21 +02:00
Andreas Rheinhardt
ac42b60441
avformat/sccdec: Make constants more intelligible
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:16:02 +02:00
Andreas Rheinhardt
6795ebb2ea
avformat/sccdec: Fix position of returned subtitle packets
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:15:43 +02:00
Andreas Rheinhardt
e1d2a208a9
avformat/sccdec: Remove redundant check
...
The av_sscanf() will filter lines like "Scenarist_SCC V1.0" out.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:14:34 +02:00
Andreas Rheinhardt
60e12318bb
avformat/sccdec: Don't use uninitialized data, fix crash, simplify logic
...
Up until now, the scc demuxer not only read the line that it intends
to process, but also the next line, in order to be able to calculate
the duration of the current line. This approach leads to unnecessary
complexity and also to bugs: For the last line, the timing of the
next subtitle is not only logically indeterminate, but also
uninitialized and the same applies to the duration of the last packet
derived from it.* Worse yet, in case of e.g. an empty file, it is not
only the duration that is uninitialized, but the whole timing as well
as the line buffer itself.** The latter is used in av_strtok(), which
could lead to crashes. Furthermore, the current code always outputs
at least one packet, even for empty files.
This commit fixes all of this: It stops using two lines at a time;
instead only the current line is dealt with and in case there is
a packet after that, the duration of the last packet is fixed up
after having already parsed it; consequently the duration of the
last packet is left in its default state (meaning "unknown/up until
the next subtitle"). If no further line could be read, processing
is stopped; in particular, no packet is output for an empty file.
*: Due to stack reuse it seems to be zero quite often; for the same
reason Valgrind does not report any errors for a normal input file.
**: While ff_subtitles_read_line() claims to always zero-terminate
the buffer like snprintf(), it doesn't do so if it didn't read anything.
And even if it did, it would not necessarily help here: The current
code jumps over 12 bytes that it deems to have read even when it
hasn't.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:14:20 +02:00
Andreas Rheinhardt
03a0dbaff3
avutil/md5: Avoid av_unused variable
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:13:57 +02:00
Andreas Rheinhardt
5d10e21809
libpostproc/postprocess_template: Don't reimplement FFSWAP
...
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 17:13:42 +02:00
Andreas Rheinhardt
a412b5e792
avcodec/bmpenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
eec5a45f05
avcodec/dnxhdenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
30c802f3ae
avcodec/dpxenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
39d28ea4d5
avcodec/magicyuvenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
c10a2959c0
avcodec/proresenc_anatoliy: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
be6da2f252
avcodec/snowenc: Remove redundant pixel format check
...
ff_encode_preinit() already checked the pixel format via
AVCodec.pix_fmts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
4b1aa74de3
avcodec/magicyuvenc: Use immediate when known
...
It allows the compiler to optimize the bytestream2 checks away.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:30:19 +02:00
Andreas Rheinhardt
1f387ae4cb
avfilter/af_afade: Remove impossible branch
...
Also don't call ff_inlink_queued_samples() unnecessarily often.
Fixes Coverity issue 1427665.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:29:11 +02:00
Andreas Rheinhardt
797fefa2e5
avfilter/formats: Update outdated comment
...
Forgotten in 06754f7bbf
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:29:11 +02:00
Andreas Rheinhardt
e1ddaf229d
avfilter/formats: Don't unnecessarily reget pixfmt descriptor
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:29:11 +02:00
Andreas Rheinhardt
3a82bb8128
avfilter/f_reverse: Don't use redundant query_formats function
...
Said function did exactly what ff_default_query_formats() does
for audio; so just remove it, so that ff_default_query_formats()
will be called.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:21:58 +02:00
Andreas Rheinhardt
c1f7e62810
avfilter/avfilter: Remove unused buffer
...
Unused since the removal of ff_get_ref_perms_string() in
a05a44e205
.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:20:42 +02:00
Andreas Rheinhardt
e1874cd3c4
avfilter/avfiltergraph: Remove always-true check
...
Always true since bc1a985ba0
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:20:21 +02:00
Andreas Rheinhardt
0615a39fed
avfilter/avfiltergraph: Free AVFilterGraph options properly
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:20:21 +02:00
Andreas Rheinhardt
22c4f33991
avfilter/avfiltergraph: Simplify adding filter to graph
...
By reallocating the array of pointers to the AVFilterContexts
before allocating the new AVFilterContext one can avoid freeing
the new AVFilterContext in case the array could not be reallocated.
Also switch to av_realloc_array() while just at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-10-02 16:20:21 +02:00
Derek Buitenhuis
68815d6791
lavf/movenc: Write 'dby1' minor brand if Dolby content is being muxed to MP4
...
This is as per:
* mp4ra: http://mp4ra.org/#/brands
* Dolby Vision muxing spec (which is public):
https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolby_vision_bitstreams_within_the_iso_base_media_file_format_dec2017.pdf
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
2021-10-01 20:29:25 +01:00
Limin Wang
da5497a1a2
avfilter/vf_codecview: added new options for block
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2021-10-01 07:49:00 +08:00
Michael Niedermayer
9f40b5badb
swscale/swscale_internal: Avoid unsigned for slice parameters
...
Mixing unsigned and signed often leads to unexpected arithmetic results.
Fixes: out of array write
Found-by: Paul B Mahol <onemda@gmail.com >
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-30 19:47:15 +02:00
Soft Works
35d784aca9
libavformat/asfdec: Add braces to define
...
Signed-off-by: softworkz <softworkz@hotmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-30 14:02:27 +02:00
Soft Works
c8cdf641c7
libavformat/asfdec: Use predefined constants
...
Signed-off-by: softworkz <softworkz@hotmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-30 14:02:27 +02:00
Arif Driessen
3ee4502753
doc/filters: note values for afftflt window function
2021-09-30 16:13:10 +05:30
Paul B Mahol
a7fc78c1a6
avfilter/vf_avgblur: switch to faster algorithm
2021-09-30 01:22:57 +02:00
Paul B Mahol
a673761ce8
avfilter/vf_blend: add few more modes
2021-09-30 01:22:48 +02:00
Michael Niedermayer
1ad4782d2a
avcodec/siren: Improve the bits left threshold in decode_envelope()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-29 19:52:10 +02:00
Michael Niedermayer
109113b54f
avcodec/siren: Check available bits in decode_envelope()
...
Fixes: Timeout
Fixes: 39089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSNSIREN_fuzzer-6677219854909440
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Suggested-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2021-09-29 19:52:10 +02:00
Paul B Mahol
df163487d0
avfilter/vf_blend: add harmonic mode
2021-09-29 19:33:59 +02:00
Paul B Mahol
8ebcff9111
avfilter/vf_blend: add geometric mode
2021-09-29 19:33:59 +02:00
Paul B Mahol
f3b07b8b12
avfilter/vf_morpho: add tophat and blackhat operations
2021-09-29 18:02:26 +02:00