Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-07avformat/concatdec: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. (Btw: concat_read_close() is not idempotent (it frees cat->files, but doesn't reset cat->nb_files), so this demuxer was incompatible with simply calling read_close generically upon read_header failure.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/brstm: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/av1dec: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/assdec: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/aqtitledec: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/ape: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/avidec: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/aaxdec: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/aadec: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat/4xm: Simplify cleanup after read_header failureAndreas Rheinhardt
by setting the FF_FMT_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat: Redo cleanup of demuxers upon read_header() failureAndreas Rheinhardt
If reading the header fails, the demuxer's read_close() function (if existing) is not called automatically; instead several demuxers call it via "goto fail" in read_header(). This commit intends to change this by adding an internal flag for demuxers that can be used to set on a per-AVInputFormat basis whether read_close() should be called generically after an error during read_header(). The flag controlling this behaviour needs to be added because it might be unsafe to call read_close() generally (e.g. this might lead to read_close() being called twice and this might e.g. lead to double-frees if av_free() is used instead of av_freep(); or a size field has not been reset after freeing the elements (see the mov demuxer for an example of this)). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-07avformat: Add internal flags for AV(In|Out)putFormatAndreas Rheinhardt
Both AVInputFormat and AVOutputFormat currently lack an equivalent to AVCodec's caps_internal. E.g. if reading a header fails, each demuxer is currently required to clean up manually, which often means to just call the demuxer's read_close function. This could (and will) be done generically via an equivalent of FF_CODEC_CAP_INIT_CLEANUP. Because of the unholy ABI-relationship between libavdevice and libavformat adding such a flag is only possible when the ABI is open (despite the flag not being part of the public API), such as now. Therefore such a flag is also added to AVOutputFormat, despite there being no immediate use for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-06avfilter/f_metadata: do not return the frame early if there is no metadataMarton Balint
The early return caused isses for the "add" mode (got fixed in c95dfe5cce98cde3e7fb14fbd04b3897f3927cec) and the "select" mode needs a similar fix. It is probably better to fully remove the check, since all modes work correctly with NULL metadata. Signed-off-by: Marton Balint <cus@passwd.hu>
2021-07-06tools/target_dec_fuzzer: move maximum variables into functionMichael Niedermayer
This fixes an issue when multiple cases are fuzzed in a single run and the limits are adjusted by more than the iteration limit. In that case the adjusted limit leaked back into the global limit causing the fuzzer to become ineffective after several iterations, MSS2 was affected by this for example. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-06avformat/matroskadec: Fix handling of huge default durationsMichael Niedermayer
Fixes: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itself Fixes: 33997/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6752039691485184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-06libavformat/rtpdec_rfc4175: Check for zero pgroup before modKyle Schwarz
Signed-off-by: Kyle Schwarz <zeranoe@gmail.com>
2021-07-06avfilter/fps: remove unconventional acronymsGyan Doshi
In dd770883e9, support for expressions was added. Among the constants added were labels of qnstc, qpal, sntsc & spal. These were added in ba2a8cb40b to represent parameter permutations where only the resolution is different. They don't have any usage currency and don't represent any industry standards or convention in terms of framerate.
2021-07-06avfilter/dnn_filter_common: Use const where appropriateLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-07-05avformat/rtsp: Include rtcp in port range checkAndriy Gelman
Currently it is only checked that the rtp port does not exceed rtp_port_max. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-07-05avformat/rtsp: Reindent after previous commitAndriy Gelman
Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-07-05avformat/rtsp: Set port_off to zero for low min/max port rangeAndriy Gelman
Fixes: $ ffmpeg -min_port 32000 -max_port 32001 -i rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov -f null - [1] 303871 floating point exception (core dumped) Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-07-05avcodec/mjpegdec: Try to continue decoding on zero quant matrix valueAndriy Gelman
A zero value in the quantization matrix is invalid but in practice will just set the transform coefficient to zero after inverse quantization. Try to continue decoding if the AV_EF_EXPLODE flag is not set. Fixes ticket #9287. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-07-05avformat/rtsp: Fix timeout optionAndriy Gelman
92c40ef882be115e72d2aa02f9032b7ce88f8537 added a listen_timeout option for sdp. This allowed a user to set variable timeout which was originally hard coded to 10 seconds. The commit used the initial_timeout variable to store the value. But this variable is shared with rtsp where it's used to infer a "listen" mode. Thus, the timeout value could not be set in rtsp, and the default value (initial_timeout = -1) would give 100ms timeout. This was attempted to be fixed in c8101aabee654f6d147a4d89f77fa73e18908610, which changed the meaning of initial_timeout = -1 to be an infinite timeout. However, it did not address the issue that the timeout could still not be set. Being able to set the timeout is useful because it allows to automatically reconfigure from a udp to tcp connection in the lower transport. In this commit this is fixed by using the stimeout variable to store the timeout value. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-07-04avcodec/setts_bsf: add a NOPTS constantJames Almer
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-04avcodec/setts_bsf: actually store the current packet's timestamps to be ↵James Almer
usable by the next Before this change, the PREV_OUTPTS and PREV_OUTDTS constants always evaluated to AV_NOPTS_VALUE. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-07-04lavfi/dnn_backend_openvino.c: Fix Memory Leak in execute_model_ovShubhanshu Saxena
In cases where the execution inside the function execute_model_ov fails, push the RequestItem back to the request_queue before returning the error. In case pushing back fails, release the allocated memory. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-04avcodec/bsf: switch to av_get_token to parse bsf list stringGyan Doshi
The recently added setts bsf makes use of the eval API whose expressions can contain commas. The existing parsing in av_bsf_list_parse_str() uses av_strtok to naively split the string at commas, thus preventing the use of setts filter with expressions containing commas. av_get_token can work with escaped commas, allowing full use of setts.
2021-07-03avcodec/lpc: check for zero err in normalization in compute_lpc_coefs()Michael Niedermayer
Fixes: floating point division by 0 Fixes: Ticket8213 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-03avcodec/j2kenc: Check for av_strtok() failureMichael Niedermayer
Fixes: CID1466601 Dereference null return value Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-03avformat/ftp: Check for av_strtok() failureMichael Niedermayer
Fixes: CID1396258 Dereference null return value Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-03tools/cws2fws: Check read() for failureMichael Niedermayer
Fixes: CID1452579 Argument cannot be negative Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-03tools/target_dec_fuzzer: Adjust threshold for theoraMichael Niedermayer
Fixes: Timeout Fixes: 33916/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-4620863119949824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-03sws: move updating the palette higher upAnton Khirnov
It does not interact in any way with the code setting up the image pointers/strides, so it should not be intermixed with it.
2021-07-03sws: move initializing dither_error higher upAnton Khirnov
It does not interact in any way with the code setting up the image pointers/strides, so it should not be intermixed with it.
2021-07-03sws: move the early return for zero-sized slices higher upAnton Khirnov
Place it right after the input parameter validation. There is no point in performing any setup if the sws_scale() call won't do anything.
2021-07-03sws: simplify setting sliceDirAnton Khirnov
2021-07-03sws: merge handling frame start into a single blockAnton Khirnov
Also, return an error code on failure rather than 0.
2021-07-03sws: make checking for the start of a new frame more explicitAnton Khirnov
2021-07-03sws: reset sliceDir at the end of sws_scale()Anton Khirnov
Makes it more clear that resetting it does not interact with the scaling code that it is currently intermixed with.
2021-07-03sws: rename SwsContext.swscale to convert_unscaledAnton Khirnov
That function pointer is now used only for unscaled conversion.
2021-07-03sws: separate the calls to scaled vs unscaled conversionAnton Khirnov
Call the scaler function directly rather than through a function pointer. Drop the now-unused return value from ff_getSwsFunc() and rename the function to reflect its new role. This will be useful in the following commits, where it will become important that the amount of output is different for scaled vs unscaled case.
2021-07-03sws: do not reallocate scratch buffers for each sliceAnton Khirnov
2021-07-03sws: group the parameters validity checks togetherAnton Khirnov
Also, fail with an error code rather than 0.
2021-07-03sws: initialize {src,dst}Stride2 consistently with {src,dst}2Anton Khirnov
2021-07-03sws: cosmeticsAnton Khirnov
Reindent after previous commit, rewrap long lines.
2021-07-03sws: factor out cascaded scalingAnton Khirnov
2021-07-03sws: cosmeticsAnton Khirnov
Reindent after previous commit, split long lines.
2021-07-03sws: factor out gamma-correct scalingAnton Khirnov
2021-07-03sws: return an error code on invalid parameters to sws_scale()Anton Khirnov
2021-07-03sws: reindent after previous commitAnton Khirnov