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

98097 Commits

Author SHA1 Message Date
Steven Liu
ea1940c6e2 avformat/hls: check output string is usable of ff_make_absolute_url
fix ticket: 8688
should goto failed workflow if cannot get usable string by ff_make_absolute_url

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-06-10 09:22:29 +08:00
Steven Liu
029ff31af6 avformat/url: check return value of strchr
fix ticket: 8687
workflow should return if there have no value of strchr

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-06-10 09:22:21 +08:00
Michael Niedermayer
f66f3ca2c1 RELEASE: We are after the 4.3 branch point, update for that
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-10 00:20:24 +02:00
James Almer
1ee3c984b9 avcodec/snow: ensure current_picture is writable before modifying its data
current_picture was not writable here because a reference existed in
at least avctx->coded_frame, and potentially elsewhere if the caller
created new ones from it.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-09 18:18:11 -03:00
Moritz Barsnick
7ab375f574 doc/utils: document the "s", "ms" and "us" suffixes for durations
These suffixes were introduced in 61c972384d
and completed in 8218249f1f.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2020-06-09 17:55:52 +05:30
Moritz Barsnick
aab0885c19 doc/ffmpeg: remove reference to deprecated option
The "-deinterlace" was deprecated since d7edd35, over eight years
ago.

Refer to deinterlacing filters instead.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2020-06-09 17:53:41 +05:30
Anton Khirnov
6943ab688d pthread_frame: change the way delay is set
It is a constant known at codec init, so set it in
ff_frame_thread_init(). Also, only set it for video, since the meaning
of this field is not well-defined for audio with frame threading.

Fixes availability of delay in callbacks invoked from the per-thread
contexts after 1f4cf92cfb.
2020-06-09 12:45:57 +02:00
Brad Hards
fb819697f6 avformat/mpegts: add constants for MPEG-TS transport stream identifiers
Signed-off-by: Brad Hards <bradh@frogmouth.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-06-09 01:01:28 +02:00
Marton Balint
81975cd24b avformat/fifo: add timeshift option to delay output
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-06-09 00:57:30 +02:00
Michael Niedermayer
cdac618c9b Changelog: add next marker back after branching 4.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:49:04 +02:00
Michael Niedermayer
c5079bf3bc Bump minor versions after branching 4.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:49:04 +02:00
Michael Niedermayer
0a8a96c251 Bump minor versions to separate 4.3 from master
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:49:04 +02:00
Michael Niedermayer
49739d1688 Changelog: Add 4.3 cut marker
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:43:10 +02:00
Michael Niedermayer
fe65923ad1 doc/APIchanges: Fill in missing values
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:40:48 +02:00
Michael Niedermayer
49e766aa4c Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."
This causes regressions in end to end timestamps with mp3s and ffmpeg.
The revert is to avoid this regression in the 4.3 release

See: [FFmpeg-devel] [PATCH] Don't adjust start time for MP3 files; packets are not adjusted.

This reverts commit 460132c998.
2020-06-08 22:08:37 +02:00
Michael Niedermayer
4f33a9803a avcodec/mpeg12dec: Fix got_output
This makes got_output consistent with the code in slice_end() which sets the output

in slice_end()
 if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
     int ret = av_frame_ref(pict, s->current_picture_ptr->f);
     ...
 } else {

Fixes: assertion failure
Fixes: 22178/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5664234440753152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 20:45:56 +02:00
Michael Niedermayer
3371d0611f tools/target_dec_fuzzer: enable mjpeg for tiff or tdsc
This is needed for fuzzing tiff/tdsc and should increase coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 20:45:56 +02:00
Michael Niedermayer
b7e5c8f67d avcodec/hcadec: Check or bound indexes
This causes indexes into scale_conversion_table to wrap around, alternatively they
could be clipped, the table be enlarged or we can error out. I have not found a document that specifies
what is the correct way to handle this

Fixes: out of array access
Fixes: 21727/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5752477891952640.fuzz
Fixes: 22438/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5640717790871552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 20:45:56 +02:00
Michael Niedermayer
8e21379da1 avcodec/pnm: Check scale
Fixes: division by zero
Fixes: 22974/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PFM_fuzzer-6270027077779456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 20:45:56 +02:00
Michael Niedermayer
3e651eeac4 tools/target_dem_fuzzer: Implement AVSEEK_SIZE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 12:27:18 +02:00
Michael Niedermayer
a5313ce654 avformat/4xm: Cleanup on GET_LIST_HEADER() failure
Fixes: memleak
Fixes: 23142/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5932860820422656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 12:27:18 +02:00
Anton Khirnov
b7e1821284 hevc: move SliceHeader and LongTermRPS back to hevcdec.h
They are no longer necessary there and have nothing to do with parameter
sets, so do not belong in hevc_ps.h.

This effectively reverts 4aaace8b25.
2020-06-08 10:51:56 +02:00
Anton Khirnov
fb30c9107a hevc_parser: drop the use of SliceHeader
It is only used to store a few local variables within one function,
which is better accomplished by just declaring them on stack explicitly.
2020-06-08 10:51:56 +02:00
Anton Khirnov
2a9bed8fc1 hevc_refs: reduce code duplication in find_ref_idx() 2020-06-08 10:51:56 +02:00
Andreas Rheinhardt
d29aaf12f4 avcodec/v4l2_m2m_enc: Avoid ;;
Inside a function, the second ; in a double ;; is a null statement, but
outside of functions a double ;; is simply invalid C that compilers
happen to accept. v4l2_m2m_enc.c contained several ;; as a result of
macro-expansion. So change the underlying macro so that it doesn't
happen any longer.

This fixes warnings when compiling with -pedantic: "ISO C does not allow
extra ‘;’ outside of a function".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-08 01:22:34 +02:00
Michael Niedermayer
27c42d33bc avcodec/ac3dec_fixed: Remove some temporary variables from scale_coefs()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 00:21:15 +02:00
Michael Niedermayer
292b9b93a5 avcodec/lzf: Consider the needed size in reallocation
Fixes: NULL pointer dereference
Fixes: 22381/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-5659879921680384.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 00:21:15 +02:00
Michael Niedermayer
5bd5c31087 avformat/mlvdec: fail reading a packet with 0 streams
Fixes: NULL pointer dereference
Fixes: 22604/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5667739074297856.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07 22:01:12 +02:00
Michael Niedermayer
1ba8484559 avformat/thp: Check compcount
Fixes: out of array access
Fixes: 22520/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5100297658826752

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07 22:01:12 +02:00
Michael Niedermayer
6d96bae9c4 avcodec/adpcm: XA: Check shift similar to filter
Fixes: negative shift
Fixes: 22499/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_XA_fuzzer-5765452130418688

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07 22:01:12 +02:00
Paul B Mahol
bd6336b970 avfilter/vf_vaguedenoiser: add new type of threshold 2020-06-07 15:20:25 +02:00
Paul B Mahol
6c57b0d63a avfilter/vf_vaguedenoiser: remove excessive code from soft thresholding 2020-06-07 15:20:11 +02:00
Gautam Ramakrishnan
d09c35677d libavcodec/jpeg2000_parser: Add jpeg2000 parser
I have attempted to write a JPEG2000 Parser. Have tested
by generating a file containing 14 frames, as mentioned
by Micheal. Have also tried testing with various packet
sizes by setting -frame_size option. Additionally,
fixed a few formatting issues as pointed out by Micheal.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-07 01:23:40 +02:00
Michael Niedermayer
8edfd0598d avformat/oggdec: Do not hardcode arbitrary and sometimes unavailable size
Fixes: regression since e983197cbc
Fixes: out of array read
Fixes: 22185/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5662069073641472

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>
2020-06-07 01:21:55 +02:00
Michael Niedermayer
108ee4b4a5 avformat/oggdec: Initialize return value from ogg_read_page() and check it everywhere
Fixes regression since 9ad47762c1
Fixes: out of array access
Fixes: 22172/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5658535590625280

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>
2020-06-07 01:21:55 +02:00
Paul B Mahol
7826fbfeaa avfilter/avf_showspectrum: properly handle EOF case 2020-06-06 19:49:14 +02:00
Paul B Mahol
1c32d7dfcf avfilter/asrc_anoisesrc: switch to activate
Allows to set EOF timestamp.
2020-06-06 15:53:07 +02:00
James Almer
49d37b4b61 avcodec/libaomenc: remove the experimental flag when using libaom 2.0.0 or newer
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-06 01:04:39 -03:00
Limin Wang
4bc5eb27a7 avutil/dict: av_realloc -> av_realloc_array()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-06 10:32:07 +08:00
Michael Niedermayer
a1223ddc56 avcodec/huffyuvdec: Test vertical coordinate more often
Fixes: out of array access
Fixes: 22892/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HYMT_fuzzer-5135996772679680.fuzz

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>
2020-06-06 00:38:53 +02:00
Dale Curtis
d9aa1ef2c2 avutil/mathematics: Fix overflow with NaN in av_add_stable()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06 00:25:00 +02:00
Dale Curtis
63ce7c71bc avformat: Fix overflow in compute_pkt_fields().
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06 00:25:00 +02:00
Michael Niedermayer
71a822fa35 avformat/rawdec: fix identifier names
Fixes: out of array access
Fixes: 22686/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5121369624018944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06 00:25:00 +02:00
Thierry Foucu
a1a85579e3 libavcodec/bmp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
the target_dec_fuzzer is checking for the avpkt.data pointer but if the
bmp parser cannot combine the frame, the poutbuf is not set.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06 00:25:00 +02:00
Thierry Foucu
3dc24b3379 libavcodec/mlp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
the target_dec_fuzzer is checking for the avpkt.data pointer but if the
mlp parser cannot combine the frame, the poutbuf is not set.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06 00:25:00 +02:00
Thierry Foucu
d5422a14e2 libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
the target_dec_fuzzer is checking for the avpkt.data pointer but if the
png parser cannot combine the frame, the poutbuf is not set.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-06 00:25:00 +02:00
Michael Niedermayer
cf28521fee avcodec/hq_hqa: Check info size
Fixes: assertion failure
Fixes: 21079/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5737046523248640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-05 18:14:17 +02:00
James Almer
b6c8444e23 avutil/buffer: separate public and internal flags inside AVBuffers
It's better to not mix user provided flags and internal flags set by
AVBufferRef helper functions.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05 10:07:05 -03:00
James Almer
f2ad89beff avutil/buffer: avutil/buffer: add a mention that some arguments from av_buffer_pool_init2() may be NULL
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05 10:07:04 -03:00
James Almer
ec39c2276a avutil/buffer: use the default allocator if none is provided to av_buffer_pool_init2()
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05 10:07:04 -03:00