summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/decode: use a single list bsf for codec decode bsfsMarton Balint2020-05-02
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffprobe: show closed caption info in the stream dumpvectronic2020-05-02
| | | | | Signed-off-by: vectronic <hello.vectronic@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/vp9dsp_template: Fix integer overflows in idct32_1d()Michael Niedermayer2020-05-02
| | | | | | | | Fixes: signed integer overflow: -193177 * 11585 cannot be represented in type 'int' Fixes: 20557/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5704852816789504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alacdsp: Fix invalid shift in append_extra_bits()Michael Niedermayer2020-05-02
| | | | | | | | Fixes: left shift of negative value -1 Fixes: 21390/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-6242539519868928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/wmalosslessdec: prevent sum of positive numbers from becoming ↵Michael Niedermayer2020-05-02
| | | | | | | | | | negative Fixes: left shift of negative value -8321365 Fixes: 20506/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4798062906310656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dstdec: Fix integer overflow in read_table()Michael Niedermayer2020-05-02
| | | | | | | | Fixes: signed integer overflow: -16 * 134217879 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5639509530378240 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/mailing-list-faq: Mention current problem with GMXMichael Niedermayer2020-05-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/opus: Reset alloc_trim when doing decoder bit-allocation.Carl Eugen Hoyos2020-05-02
| | | | | Fixes ticket #8649. Reported-by: irc user Xogium
* s->target_i and global are in dB but s->target_tp and true_peak areSebastian Dröge2020-05-01
| | | | | | | linear. Instead of mixing these in the calculations, convert the former first to have all following calculations in the same unit. Signed-off-by: Kyle Swanson <k@ylo.ph>
* avcodec/nvenc: refactor dts calculation logicTimo Rothenpieler2020-05-02
| | | | | | | | | | | | | The old approach used some highly complex delta computation math and output-delaying. I do not remember what the initial reasoning behind that was, but given that we can just offset the dts by the amount of bframes, it seems wholy unnecessary. This leaves open an issue with VFR content, for which some more complex logic might be needed. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* ac3enc: fix AC3 downmix metadata issuePiotr Oleszczyk2020-05-01
| | | | | | | | | Due to a typo, it was impossible to write 0.595 / -4.5 dB of ltrt_cmixlev, ltrt_surmixlev, loro_cmixlev, loro_surmixlev. Without any error 0.841 / -1.5 dB was written to file. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggdec: Reallocate buffer before writing into itMichael Niedermayer2020-05-01
| | | | | | | | Fixes: out of array write Fixes: Regression since f619e1ec66b89215582eff4404b681b760540b4f Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggdec: Factor buffer reallocation outMichael Niedermayer2020-05-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/librav1e: Use the framerate when available for ratecontrolDerek Buitenhuis2020-05-01
| | | | | | | | Rav1e currently uses the time base given to it only for ratecontrol... where the inverse is taken and used as a framerate. So, do what we do in other wrappers and use the framerate if we can. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/nvenc: offset dts to account for b-frame reorderingTimo Rothenpieler2020-05-01
| | | | | | Fixes ticket #7303 Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avformat/hlsenc: add support for microseconds since epoch based sequence numberMarton Balint2020-05-01
| | | | | | | | | Sequence numbers of segments should be unique, if an encoder is using shorter than 1 second segments and it is restarted, then future segments will be using already used sequence numbers if initial sequence number is based on the number of seconds since epoch and not microseconds. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/opt: only skip evaluation for rational optionsMarton Balint2020-05-01
| | | | | | | | | | | | Fixes problems when non-rational options were set using rational expressions, causing rounding errors and the option range limits not to be enforced properly. ffmpeg -f lavfi -i "sine=r=96000/2" This caused an assertion failure with assert level 2. Signed-off-by: Marton Balint <cus@passwd.hu>
* doc/utils: add more examples for valid time durationLimin Wang2020-05-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/concat: priv_data should be freed internallyLimin Wang2020-05-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/dashenc: remove the arbitrary restrictions for filenameLimin Wang2020-05-01
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpeg12enc: Use FF_PROFILE_MPEG2_xxx macrosLimin Wang2020-05-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/matroskadec: CosmeticsAndreas Rheinhardt2020-05-01
| | | | | | | | Reindentation as well as marking several variables used for demuxing RealAudio as const to clearly see that they don't change during demuxing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Support ContentCompression for all codecsAndreas Rheinhardt2020-05-01
| | | | | | | | | | | | The Matroska demuxer has three functions for creating packets out of the data read: One for certain RealAudio codecs (ATRAC3, cook, sipr, RealAudio 28.8), one for WebVTT (actually, the WebM flavour of it) and one for all the others. Only the last function supported Matroska's ContentCompression (e.g. it reversed zlib compression or added the removed headers to the packets). But in Matroska, all tracks are allowed to be compressed. This commit adds support for this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Cache whether a track needs to be decodedAndreas Rheinhardt2020-05-01
| | | | | | There is no need to recheck this for every frame. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Improve forward compabilityAndreas Rheinhardt2020-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | Matroska is built around the principle that a reader does not need to understand everything in a file in order to be able to make use of it; it just needs to ignore the data it doesn't know about. Our demuxer typically follows this principle, but there is one important instance where it does not: A Block belonging to a TrackEntry with no associated stream is treated as invalid data (i.e. the demuxer will try to resync to the next level 1 element because it takes this as a sign that it has lost sync). Given that we do not create streams if we don't know or don't support the type of the TrackEntry, this impairs this demuxer's forward compability. Furthermore, ignoring Blocks belonging to a TrackEntry without corresponding stream can (in future commits) also be used to ignore TrackEntries with obviously bogus entries without affecting the other TrackEntries (by not creating a stream for said TrackEntry). Finally, given that matroska_find_track_by_num() already emits its own error message in case there is no TrackEntry with a given TrackNumber, the error message (with level AV_LOG_INFO) for this can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Don't discard valid packetsAndreas Rheinhardt2020-05-01
| | | | | | | | | | | | | | | | | | | | | | A Block (meaning both a Block in a BlockGroup as well as a SimpleBlock) must have at least three bytes after the field containing the encoded TrackNumber. So if there are <= 3 bytes, the Matroska demuxer would skip this block, believing it to be an empty, but valid Block. This might discard valid nonempty Blocks, namely if the track uses header stripping. And certain definitely spec-incompliant Blocks don't raise errors: Those with two or less bytes left after the encoded TrackNumber and those with three bytes left, but with flags indicating that the Block uses lacing as then there has to be further data describing the lacing. Furthermore, zero-sized packets were still possible because only the size of the last entry of a lace was checked. This commit fixes this. All spec-compliant Blocks that contain data (even if side data only) are now returned to the caller; spec-compliant Blocks that don't contain anything are not returned. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Simplify checks for cook and ATRAC3Andreas Rheinhardt2020-05-01
| | | | | | | | Some conditions which don't change and which can therefore be checked in read_header() were instead rechecked upon parsing each block. This has been changed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Don't output uninitialized data for RealAudio 28.8Andreas Rheinhardt2020-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Matroska demuxer splits every sequence of h Matroska Blocks into h * w / cfs packets of size cfs; here h (sub_packet_h), w (frame_size) and cfs (coded_framesize) are parameters from the track's CodecPrivate. It does this by splitting the Block's data in h/2 pieces of size cfs each and putting them into a buffer at offset m * 2 * w + n * cfs where m (range 0..(h/2 - 1)) indicates the index of the current piece in the current Block and n (range 0..(h - 1)) is the index of the current Block in the current sequence of Blocks. The data in this buffer is then used for the output packets. The problem is that there is currently no check to actually guarantee that no uninitialized data will be output. One instance where this is trivially so is if h == 1; another is if cfs * h is so small that the input pieces do not cover everything that is output. In order to preclude this, rmdec.c checks for h * cfs == 2 * w and h >= 2. The former requirement certainly makes much sense, as it means that for every given m the input pieces (corresponding to the h different values of n) form a nonoverlapping partition of the two adjacent frames of size w corresponding to m. But precluding h == 1 is not enough, other odd values can cause problems, too. That is because the assumption behind the code is that h frames of size w contain data to be output, although the real number is h/2 * 2. E.g. for h = 3, cfs = 2 and w = 3 the current code would output four (== h * w / cfs) packets. although only data for three (== h/2 * h) packets has been read. (Notice that if h * cfs == 2 * w, h being even is equivalent to cfs dividing w; the latter condition also seems very reasonable: It means that the subframes are a partition of the frames.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Fix buffer overflow when demuxing RealAudio 28.8Andreas Rheinhardt2020-05-01
| | | | | | | | | | | | | | | | | | | | | | | | RealAudio 28.8 (like other RealAudio codecs) uses a special demuxing mode in which the data of the existing Matroska Blocks is not simply forwarded as-is. Instead data from several Blocks is recombined together to output several packets. The parameters governing this process are parsed from the CodecPrivate: Coded framesize (cfs), frame size (w) and sub_packet_h (h). During demuxing, h/2 pieces of data of size cfs each are read from every Matroska (Simple)Block and put at offset m * 2 * w + n * cfs of a buffer of size h * w, where m ranges from 0 to h/2 - 1 for each Block while n is initially zero and incremented after a Block has been parsed until it is h, at which poin the assembled packets are output and n reset. The highest offset is given by (h/2 - 1) * 2 * w + (h - 1) * cfs + cfs while the destination buffer's size is given by h * w. For even h, this leads to a buffer overflow (and potential segfault) if h * cfs > 2 * w; for odd h, the condition is h * cfs > 3 * w. This commit adds a check to rule this out. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Fix demuxing RealAudio 28.8Andreas Rheinhardt2020-05-01
| | | | | | | | | | | | | | | | | RealAudio 28.8 does not need or use sub_packet_size for its demuxing and this field is therefore commonly set to zero. But since 18ca491b the Real Audio specific demuxing is no longer applied if sub_packet_size is zero because the codepath for cook and ATRAC3 divide by it; this made these files undecodable. Furthermore, since 569d18aa (merged in 2c8d876d) sub_packet_size being zero is used as an indicator for invalid data, so that a file containing such a track was completely skipped. This commit fixes this by not checking sub_packet_size for RealAudio 28.8 at all. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Simplify check for RealAudioAndreas Rheinhardt2020-05-01
| | | | | | | | | They need a special parsing mode and in order to find out whether this mode is in use, several checks have to be performed. They can all be combined into one: If the buffer that is only used to assemble their packets has been allocated, use the RealAudio parsing mode. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Reject sipr flavor > 3Andreas Rheinhardt2020-05-01
| | | | | | | | | | | | | | Only flavors 0..3 seem to exist. E.g. rmdec.c treats any flavor > 3 as invalid data. Furthermore, we do not know how big the packets to create ought to be given that for sipr these values are not read from the bitstream, but from a table. Furthermore, flavor is only used for sipr, so only check it for sipr; rmdec.c does the same. (The old check for flavor being < 0 was always wrong given that flavor is an int that is read via avio_rb16(), so it has been removed completely.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpegts: fix av_freep for dovi pointerLimin Wang2020-05-01
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mov: fix av_freep for dovi pointerLimin Wang2020-05-01
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* fate/oggopus-demux: fix fate failureLynne2020-05-01
| | | | | Failure was due to the extra comment printed by libavcodec/utils.c since side data is used to signal the skipped samples.
* avfilter/af_adelay: Check sscanf() return valueLimin Wang2020-05-01
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_mix: Check sscanf() return valueLimin Wang2020-05-01
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* oggdec: add support for proper demuxing of chained Opus files and streamsLynne2020-04-30
| | | | | | Part of this patch is based on Paul B Mahol's patch from last year. This also allows for single-stream parameter/codec changes.
* oggdec: use ffio_ensure_seekback() to seek back on incorrect dataLynne2020-04-30
| | | | | This cleans up the code and simplifies it. It also speeds up parsing since the old pb position was incorrect.
* oggdec: verify page checksumLynne2020-04-30
| | | | | | This makes decoding far more robust, since OggS, the ogg magic, can be commonly found randomly in streams, which previously made the demuxer think there's a new stream or a change in such.
* oggdec: eliminate copies and extra buffersLynne2020-04-30
| | | | This also makes implementing CRC checking far simpler and more robust.
* avformat/utils: change the duration to int64_t for update_initial_durationsLimin Wang2020-05-01
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/cbs_h265: fix writing extension_data bitsJames Almer2020-04-30
| | | | | | We only care about the right most bit. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/v4l2_context: Log warning when all capture buffers are in userspaceAndriy Gelman2020-04-30
| | | | | | | | | | | | | | | | v4l2_m2m uses device memory mapped buffers to store dequeued frames/packets (reference counted by AVBufferRef). When the reference count drops to zero, the buffer ownership is returned back to the device, so that they can re-filled with frames/packets. There are some cases when all the capture buffers are in userspace (i.e. due to internal buffering in ffmpeg). On the s5p-mfc this causes an infinite wait when polling to dequeue the buffers, which can be prevented by increasing the total number of buffers. This commit adds a warning when all the capture buffers are dequeued. Reviewed-by: Ming Qian <ming.qian@nxp.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avfoundation: Fix building on iOSMartin Storsjö2020-04-30
| | | | | | | | | | | | Apparently the changes from 3c9185bf3a83395d12a987f626dbdb985eac4320 aren't enough; even with that in place, I got errors like this when trying to build for iOS: src/libavdevice/avfoundation.m:135:5: error: 'AVCaptureDeviceTransportControlsPlaybackMode' is unavailable: not available on iOS AVCaptureDeviceTransportControlsPlaybackMode observed_mode; ^
* avfilter/af_crossfeed: make options runtime configurablePaul B Mahol2020-04-30
|
* avfilter/af_crossfeed: make slope configurablePaul B Mahol2020-04-30
|
* avfilter/af_crossfeed: fix calculation of alpha parameterPaul B Mahol2020-04-30
| | | | Use A in calculation.
* avfilter: add asubboost filterPaul B Mahol2020-04-30
|
* tools: fix const specifier for AVInputFormatJosh de Kock2020-04-30
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>