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

105822 Commits

Author SHA1 Message Date
Andreas Rheinhardt
90e5eef731 avcodec/vp6: Check initializing VP6A context
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-13 12:24:06 +01:00
Paul B Mahol
fad5c6d743 avcodec/qdmc: switch to fft from lavu/tx 2022-02-12 14:24:35 +01:00
Paul B Mahol
fcee53619a avfilter/af_surround: change x/y spread defaults
Previous default value of 1.0 is producing lesser quality channels.
2022-02-12 12:48:42 +01:00
Paul B Mahol
619519ee0a avfilter/af_surround: avoid implicit conversion to float 2022-02-12 12:48:28 +01:00
Paul B Mahol
b015c101ab avfilter/af_surround: switch to rdft from avutil/tx 2022-02-12 12:48:18 +01:00
Paul B Mahol
f05c52985c avfilter: add dialogue enhance audio filter 2022-02-12 12:47:36 +01:00
Paul B Mahol
800dfd2eac avfilter/af_atempo: switch to rdft from lavu/tx 2022-02-12 12:45:43 +01:00
Limin Wang
e8f439631f avformat/udp: remove IPPROTO_IPV6 macro
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Limin Wang
268d00bb87 avformat/udp: Fix IP_MULTICAST_TTL for BSD compatibility
Suggested by zhilizhao, vlc project has solved the compatibility by
the same way, so I borrowed the comments from vlc project.

Fixes ticket #9449

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Limin Wang
c0817ee92e avformat/udp: use one setsockopt for ipv4/ipv6
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Limin Wang
1de24ee512 avformat/udp: properly check for valid ttl in url
Zhao Zhili added a ttl upper bound in commit 9daac85da8,
but the check for ttl in url is missing still.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-02-12 08:41:55 +08:00
Paul B Mahol
1ca19cf371 avfilter/af_compensationdelay: add commands support 2022-02-11 21:19:27 +01:00
David Lacko
4b40e20ce9 avfilter/af_adelay: add command support
Add command 'delays' to the adelay filter.
This command accepts same values as the option with one difference, to apply
delay to all channels prefix 'all:' to the argument.

Signed-off-by: David Lacko <deiwo101@gmail.com>
2022-02-11 20:30:17 +01:00
Andreas Rheinhardt
f5d6c78a88 avcodec/metasound, twinvqdec: Cleanup generically upon init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
d75c4cc7c1 avutil/tx: Fix documentation of av_tx_uninit()
Adapt it to the actual (sane) behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
6bb46cd765 avcodec/g2meet: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
21c41237d2 avcodec/4xm: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
c6fcd2ae36 avcodec/cavsdec: Fix error message
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
799e128562 avcodec/cavsdec: Mark decoder as init-threadsafe
It does not initialize any static data in its .init.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
805d7414dc avcodec/cavsdec: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
71bd076b30 avcodec/vorbisenc: Cleanup generically on init-failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
f200424fbf avcodec/tta: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
7743933a60 avcodec/ralf: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
ca73a2c826 avcodec/vc2enc: Cleanup generically on allocation failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
31da97b083 avcodec/vc2enc_dwt: Avoid NULL - 0
It is sane, but UB. It could happen in case of allocation errors
in vc2_encode_init().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
fb36af3b66 avcodec/proresenc_kostya: Use av_calloc/av_malloc_array()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Andreas Rheinhardt
9d5810702c avcodec/proresenc_kostya: Cleanup generically after init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:40 +01:00
Andreas Rheinhardt
321c31cfe6 avcodec/cbs_jpeg: Fix size of huffman symbol table array
L[i] can be in the range of 0-255, see table B.5 of ITU T.81.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:40 +01:00
Justin Ruggles
0dd1ff67c8 http: Send a Range header even when the offset is 0
Using Range allows for getting the full file size from the
Content-Range header in the response, even if the server sends
back the response using chunked Transfer-Encoding, which does not
allow using Content-Length.
2022-02-11 11:31:38 +01:00
Justin Ruggles
c1228315c9 http: Improve handling of Content-Range with Transfer-Encoding:chunked
When Transfer-Encoding:chunked is used, the client must ignore a
Content-Length header, if present. However, it should not ignore a
Content-Range header, which also includes the full size of the
entity.
2022-02-11 11:31:38 +01:00
Martin Storsjö
402784ba9f aarch64: h264dsp: Fix incorrectly indented code
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-02-11 10:49:12 +02:00
Andreas Rheinhardt
10e520f1f1 avcodec/pngdec: Cleanup generically on init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 06:52:12 +01:00
Jiasheng Jiang
c4d63dbc94 avcodec/vp6: return value check for av_mallocz
As the potential failure of the av_mallocz(), the 's->alpha_context'
could be NULL and be dereferenced later.
Therefore, it should be better to check it and deal with it if fails
in order to prevent memory leak, same as the av_frame_alloc() in
ff_vp56_init().

Fixes: 39a3894ad5 ("lavc/vp6: Implement "slice" threading for VP6A decode")
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
2022-02-11 16:29:50 +11:00
Gyan Doshi
b6bb6b9f22 avformat/mpegts: initialize max_packet_size when sub-demuxer
bca30570d2 added a user option to set max_packet_size replacing
a hardcoded value. This had a side-effect of leaving the field
set to 0 when packet demuxing is carried out from another demuxer
using avpriv functions, which could lead to demux failure.

Hardcoded max_packet_size inside avpriv_mpegts_parse_open to
2048000 to avoid this. Value chosen to be 10x that of default value
to accommodate large payloads.
2022-02-10 16:57:59 +05:30
Paul B Mahol
9bdb476c40 avfilter/vf_avgblur: fix memory leaks if config_input() is called again 2022-02-10 09:22:36 +01:00
Paul B Mahol
9809f318ea avfilter/vf_dblur: fix memory leaks if config_input() is called again 2022-02-10 09:22:36 +01:00
Paul B Mahol
f89cd457ca avfilter/vf_gblur: fix memory leaks if config_input() is called again 2022-02-10 09:22:36 +01:00
Paul B Mahol
a0ede3cb56 avfilter/vf_gblur: use av_freep() 2022-02-10 09:22:36 +01:00
Andreas Rheinhardt
e1edfe6416 avcodec/pthread_frame: Properly unref frame in case of decoding failure
Use ff_thread_release_buffer() instead of av_frame_unref(),
as the former handles the case of non-thread-safe callbacks
properly. (This is possible now that ff_thread_release_buffer()
no longer requires a ThreadFrame.)

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-09 17:22:51 +01:00
Andreas Rheinhardt
02220b88fc avcodec/thread: Don't use ThreadFrame when unnecessary
The majority of frame-threaded decoders (mainly the intra-only)
need exactly one part of ThreadFrame: The AVFrame. They don't
need the owners nor the progress, yet they had to use it because
ff_thread_(get|release)_buffer() requires it.

This commit changes this and makes these functions work with ordinary
AVFrames; the decoders that need the extra fields for progress
use ff_thread_(get|release)_ext_buffer() which work exactly
as ff_thread_(get|release)_buffer() used to do.

This also avoids some unnecessary allocations of progress AVBuffers,
namely for H.264 and HEVC film grain frames: These frames are not
used for synchronization and therefore don't need a ThreadFrame.

Also move the ThreadFrame structure as well as ff_thread_ref_frame()
to threadframe.h, the header for frame-threaded decoders with
inter-frame dependencies.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-09 17:22:35 +01:00
Andreas Rheinhardt
f025b8e110 avcodec/threadframe: Add ff_thread_(get|release)_ext_buffer()
These will be used by the codecs that need allocated progress
and is in preparation for no longer using ThreadFrame by the codecs
that don't.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-09 17:22:23 +01:00
Andreas Rheinhardt
b3551b6072 avcodec/thread: Move ff_thread_(await|report)_progress to new header
This is in preparation for further commits that will stop
using ThreadFrame for frame-threaded codecs that don't use
ff_thread_(await|report)_progress(); the API for those codecs
having inter-frame depdendencies will live in threadframe.h.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-09 17:22:16 +01:00
Andreas Rheinhardt
7fc10e273b avcodec/hapdec: Remove always-false check
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-09 17:22:05 +01:00
Andreas Rheinhardt
7bf38eb000 avcodec/pthread_frame: Don't prematurily presume frame-threading
Several of our decoders support both frame- as well as slice-threading;
in case of the latter avctx->internal->thread_ctx points to
a SliceThreadContext, not to a frame-thread PerThreadContext.
So only treat avctx->internal->thread_ctx as the latter after
having checked that frame-threading is active.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-09 17:18:43 +01:00
Michael Niedermayer
ce43e1c581 avcodec/motion_est: fix indention of ff_get_best_fcode()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-09 10:54:30 +01:00
Michael Niedermayer
634312a70f avcodec/motion_est: Fix xy indexing on range violation in ff_get_best_fcode()
This codepath seems untested, no testcases change

Found-by: <mkver>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-09 10:54:30 +01:00
Michael Niedermayer
bf33a38499 avformat/hls: Use unsigned for iv computation
Fixes: signed integer overflow: 9223372036854775748 + 60 cannot be represented in type 'long'
Fixes: 44417/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5802443881971712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-09 10:50:35 +01:00
Michael Niedermayer
6ee283d7d0 avcodec/jpeglsdec: Increase range for N in ls_get_code_runterm() by using unsigned
Fixes: left shift of 32768 by 16 places cannot be represented in type 'int'
Fixes: Timeout
Fixes: 44219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-4679455379947520
Fixes: 44088/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-4885976600674304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-09 10:50:35 +01:00
Michael Niedermayer
5038933977 avformat/matroskadec: Check desc_bytes
Fixes: Division by 0
Fixes: 44035/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4826721386364928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-09 10:50:35 +01:00
Michael Niedermayer
59328aabd2 avformat/utils: Fix invalid NULL pointer operation in ff_parse_key_value()
Fixes: pointer index expression with base 0x000000000000 overflowed to 0xffffffffffffffff
Fixes: 44012/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-5670607746891776

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-02-09 10:50:35 +01:00