1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-22 04:04:14 +02:00
Commit Graph

95545 Commits

Author SHA1 Message Date
Michael Niedermayer
f4ecf6c39d avcodec/ralf: Skip initializing unused filter variables
Fixes: left shift of negative value -1
Fixes: 17890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5643307467669504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
42eb78059d avcodec/takdec: Fix overflow with large sample rates
Fixes: signed integer overflow: 2147483647 + 511 cannot be represented in type 'int'
Fixes: 17899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5719753322135552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Paul B Mahol
37d8ae9da8 doc/filters: fix another typo 2019-10-24 21:42:00 +02:00
Paul B Mahol
9bf5e7992f avcodec/interplayvideo: cosmetics 2019-10-24 20:59:05 +02:00
Paul B Mahol
f166951d6e avfilter: add maskedmin/maskedmax filters 2019-10-24 20:54:33 +02:00
Andreas Rheinhardt
262eef6b89 avformat/mpeg: Don't free unintialized pointer
In order to fix a potential memleak upon failure, 0b8956b2 made sure that
a buffer given by a pointer was freed upon error. But this pointer was
only initialized upon use and in several cases (Clang gives no fewer
than 13 -Wsometimes-uninitialized warnings) this meant that an
uninitialized pointer was used to free a buffer. So initialize the
pointer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-24 15:51:20 -03:00
Ramiro Polla
531fbce0b2 mpegvideo_enc: add intra_penalty option for p frames
This option allows more control over the use of intra macroblocks in
predictive frames.

By using '-intra_penalty max', intra macroblocks are never used in
predictive frames.

It is useful for glitch artists to generate input material. This option
allows them to split and merge two video files while maintaining fluid
motion from the second video without having intra macroblocks restoring
chunks of the first video.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Andreas Rheinhardt
3d5d0301c3 avformat/icoenc: Add deinit function
Prevents memleaks in situations where the trailer isn't written, e.g.
because of errors during writing the header.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Andreas Rheinhardt
f53525d248 avformat/aiffenc: Use better error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Andreas Rheinhardt
c36eae65e4 avformat/mpeg: Add padding to extradata
Extradata is supposed to be padded with AV_INPUT_BUFFER_PADDING_SIZE bytes,
yet the VobSub demuxer used av_strdup for the allocation of extradata.
This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Paul B Mahol
ac0f5f4c17 avfilter/vf_maskedclamp: add x86 SIMD 2019-10-23 16:20:21 +02:00
Zhao Zhili
11cfff04ed FATE/dnn: add .gitignore
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2019-10-23 09:58:17 -03:00
Zhao Zhili
eafc8afafc avcodec/tests: add h265_levels to .gitignore 2019-10-23 09:56:38 -03:00
Paul B Mahol
7df808ea84 avfilter/settb: switch to activate
Now correctly updates EOF timestamp.
2019-10-23 12:37:46 +02:00
Paul B Mahol
8732eb124e avfilter/vf_floodfill: better fix for crash 2019-10-23 10:20:57 +02:00
Paul B Mahol
1cdc805228 avfilter/vf_floodfill: add more gray formats 2019-10-23 10:04:15 +02:00
Paul B Mahol
ba7d55d3fc avfilter/vf_deband: add more gray formats 2019-10-23 09:54:36 +02:00
Jun Zhao
0e3d5bdc08 lavfi/bilateral: Clean the option description and unused code
Clean the option description and unused code.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-10-23 15:47:27 +08:00
Paul B Mahol
7832e05c35 avfilter/vf_lut2: fix typo, correctly support gray14 2019-10-23 09:44:08 +02:00
Paul B Mahol
1f327f5d27 avfilter/vf_bm3d: add gray14 format 2019-10-23 09:37:18 +02:00
Paul B Mahol
dd239bdb65 avfilter/vf_vaguedenoiser: add more gray formats 2019-10-23 09:31:09 +02:00
Paul B Mahol
ec5d385722 avfilter/transpose: add missing headers 2019-10-22 19:53:50 +02:00
James Almer
738bc3e742 x86/vf_transpose: make ff_transpose_8x8_16_sse2 work on x86_32
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22 13:51:13 -03:00
Paul B Mahol
2a75006ddc avfilter/vf_maskedclamp: rewrite using macro 2019-10-22 18:10:03 +02:00
James Almer
a34d06222f avcodec/libdav1d: fix setting AVFrame reordered_opaque
Actually reorder the values.

Should effectively fix ticket #8300.

Tested-by: Andrey Semashev <andrey.semashev@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22 12:00:49 -03:00
James Almer
78a24fd014 avcodec/atrac9tab: use explicit ATRAC9BlockConfig struct initializers
Cosmetic change.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22 10:49:30 -03:00
Paul B Mahol
5561a1de90 avfilter/vf_premultiply: fix signed integer overflow
Fixes #8324
2019-10-22 10:38:16 +02:00
Steven Liu
0b8956b25c avformat/mpeg: move the header_str free into end label
fix CID: 1454875

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:54:36 +08:00
Steven Liu
388e1fc9b5 avcodec/psd: remove unneeded code
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:51:42 +08:00
Steven Liu
36ed8ae52c avcodec/hevcdec: remove unneeded code
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:51:37 +08:00
Steven Liu
d92b2296f8 avformat/segafilmenc: remove unneeded code
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:51:30 +08:00
Andreas Rheinhardt
74cafb0e6f avformat/matroskaenc: Cosmetics
Contains renaming of variables (e.g. mkv_write_cues() contained
variables called tracknum that actually contain the index of a track in
s->streams and not the track number (which can differ in case an
explicit dash track number is set)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
c486fe206e avformat/matroskaenc: Use more appropriate function name
mkv_start_new_cluster() actually didn't start a new cluster, but ended
the old one instead and emitted a debug message that it had started a
new cluster. This has been changed: The debug message has been moved to
the place that really starts a new cluster and the function has been
renamed to mkv_end_cluster().

Furthermore, without this debug message the function can be used for
flushing.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
b4e36df74f avformat/matroskaenc: Remove redundant assert
The Matroska muxer groups index entries with the same pts together in
order to save a few bytes. Because of Matroska's variable-length length
fields, mkv_write_cues() does this by first finding out how many index
entries will be grouped together before actually writing them.
Currently, it is asserted at both of these stages that the stream index
of the list of designated index entries is valid. But the second assert
is redundant, because the very same index entries have already been
checked.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
65ef74f749 avformat/matroskaenc: Move track-related fields to mkv_track
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
7797fdfe6f avformat/matroskaenc: Use ffio_free_dyn_buf
instead of replicating its behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 20:35:54 -03:00
Andreas Rheinhardt
982a98a0e3 avformat/matroskaenc: Fix memleak upon failure
The Matroska muxer up until now leaked memory in two scenarios:

1. If an error happened during writing the trailer, as
mkv_write_trailer() returned early without cleaning up.
2. If mkv_write_header() indicated success despite an error in the
underlying AVIOContext. In this case avformat_write_header() returned
the IO error and according to the API the caller is not allowed to call
av_write_trailer(), so that no cleanup happened for the allocations made
in mkv_write_header().

This has been fixed by using a dedicated deinit function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 20:35:54 -03:00
Limin Wang
887db36821 avfilter/vsrc_mptestsrc: simplify the code and change the type of frame
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00
Michael Niedermayer
e85eb7cb04 avcodec/atrac9dec: Set channels
Fixes: null pointer dereference
Fixes: 18341/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5681203490848768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00
Limin Wang
6079bd5c63 avfilter/vsrc_mptestsrc: add options to set the maximum number of frames
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00
Limin Wang
7a477c4b63 avfilter/vf_unsharp: rename config_props -> config_input, link -> inlink
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00
James Almer
cecf29eb1c avformat/oggenc: free buffered page lists while uninitializing the muxer
If the trailer is never writen, there could be buffered pages that would leak.

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:20:58 -03:00
James Almer
aeb8b65cdf avformat/flacenc: add a deinit function
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:20:20 -03:00
James Almer
df57246aaf avformat/mp3enc: add init and deinit functions
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:20:20 -03:00
James Almer
b46cdd9d23 avformat/ttaenc: add a deinit function
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:20:20 -03:00
James Almer
a581bb66ea avformat/avienc: add deinit function
Fixes ticket #8302

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:20:20 -03:00
James Almer
02cf239196 avformat: call AVOutputFormat->deinit() when freeing the context
Despite the doxy stating that it's called when the muxer is destroyed,
this was not true in practice. It's only called by av_write_trailer()
and on init() failure.

An AVFormatContext may be closed without writing the trailer if errors
ocurred while muxing packets, so in order to prevent memory leaks, it
should effectively be called when freeing the muxer.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:20:20 -03:00
James Almer
27bae5aaca x86/vf_transpose: fix cpuflags check
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:01:39 -03:00
Paul B Mahol
ccd9bca15a avfilter/vf_transpose: add x86 SIMD 2019-10-21 20:37:51 +02:00
Paul B Mahol
f7f4691f9f avfilter/x86/vf_atadenoise: fix comment 2019-10-21 17:56:45 +02:00