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
2022-09-22avformat/aiffdec: Use 64bit for block_duration useMichael Niedermayer
Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896 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>
2022-09-22avformat/aiffdec: Check block_durationMichael Niedermayer
Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896 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>
2022-07-02avformat/aiffdec: cleanup size handling for extreem casesMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-06-17avformat/aiffdec: avoid integer overflow in get_meta()Michael Niedermayer
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-10avformat/utils: Move ff_get_extradata to demux_utils.cAndreas Rheinhardt
It is only used by demuxers (although it is hypothetically possible that some day e.g. a protocol might need it, but that is unlikely given that they don't deal with AVCodecParameters). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-15aiff: convert to new channel layout APIVittorio Giovara
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
2021-11-01avformat/aiffdec: "-1" -> AVERROR_INVALIDDATAMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-01avformat/aiffdec: Use av_rescale() for bitrateMichael Niedermayer
Fixes: integer overflow Fixes: 40313/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-4814761406103552 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>
2021-11-01avformat/aiffdec: sanity check block_alignMichael Niedermayer
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-11-01avformat/aiffdec: Check sample_rateMichael Niedermayer
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-31avformat/aiffdec: Check for size overflow in header parsingMichael Niedermayer
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6723467048255488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-04-27avformat: Constify all muxer/demuxersAndreas Rheinhardt
This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-18avformat/id3v2: Don't reverse the order of id3v2 APICsAndreas Rheinhardt
When parsing ID3v2 tags, special (non-text) metadata is not applied directly and unconditionally; instead it is stored in a linked list in which elements are prepended. When traversing the list to add APICs (or private tags) at the end, the order is reversed. The same also happens for chapters and therefore the chapter parsing code already reverses the chapters. This commit changes this: By keeping pointers to both head and tail of the linked list one can preserve the order of the entries and remove the reordering code for chapters. Only the pointer to head will be exported: No current caller uses a nonempty list, so exporting both head and tail is unnecessary. This removes the functionality to combine the lists of special metadata read from different ID3v2 tags, but that doesn't make really much sense anyway (and would be trivial to implement if desired) and allows to remove the now unnecessary initializations performed by the callers. The FATE-reference for the id3v2-priv test had to be updated because the order of the tags read into the dict is reversed; for id3v2-priv-remux only the md5 and not the ffprobe output of the remuxed file changes because the order of the private tags has up until now been reversed twice. The references for the aiff/mp3 cover-art tests needed to be updated, because the order of the attached pics is reversed upon reading. It is still not correct, because the muxers write the pics in the order in which they arrive at the muxer instead of the order given by pkt->stream_index. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-03-03avformat/aiffdec: Check that SSND is at least 8 bytesMichael Niedermayer
Fixes: Infinite loop Fixes: 30874/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5933710488764416 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>
2021-02-23avformat/aiff: Deduplicate codec tags and codec tags listAndreas Rheinhardt
Also saves a relocation. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-23avformat/Makefile: Remove outdated AIFF demuxer dependency on iso_mediaAndreas Rheinhardt
This is a result of the mov channel parsing stuff being factored out of mov.c twice: Once in 91b782720fd0df5571775b6591bc41797d6ecf78 to isom.c and later in 3bab7cd12802dc5abf2c5cc6dec49e9e249ce204. Also remove the isom.h header; and while just at it, remove an unused mathematics.h inclusion. (isom.c actually depends upon mpeg4audio from libavcodec for avpriv_mpeg4audio_get_config2 and avpriv_mpa_freq_tab; yet there is no configure dependency for iso_media which leads to failure of shared builds.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-29avformat/aiffdec: Check size before subtraction in get_aiff_header()Michael Niedermayer
Fixes: Infinite loop Fixes: 27235/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5761398380167168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-11-05avformat/aiffdec: Check packet sizeMichael Niedermayer
Fixes: Fixes infinite loop Fixes: 26575/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5727522236661760 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-25avformat/id3v2: Remove unnecessary indirectionAndreas Rheinhardt
ff_id3v2_parse_apic/chapters/priv/priv_dict all had a parameter extra_meta of type ID3v2ExtraMeta ** as if the functions wanted to make *extra_meta point to something else. But they don't, so just use an ID3v2ExtraMeta *. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-12-12avformat: Forward errors where possibleAndreas Rheinhardt
It is not uncommon to find code where the caller thinks to know better what the return value should be than the callee. E.g. something like "if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit changes several instances of this to instead forward the actual error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-25avformat/aiffdec: fix signed integer overflowPaul B Mahol
Fixes #8151
2019-09-21avformat/aiffdec: parse replaygain metadataMoritz Barsnick
Signed-off-by: Moritz Barsnick <barsnick@gmx.net> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-21lavf: Constify the probe function argument.Carl Eugen Hoyos
Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
2018-01-11avformat/aiffdec: AIFF fix in case of ANNOEduard Sinelnikov
Apple's AIFF protocol clearly states that each chucnk which is odd sized a padding should be added. In the old version of aiffdec adding of padding was done in `get_meta`. And in case of unknown chunk name it was done in defalut case. The new version has deleted the padding in default case and added padding adding after the switch. But the new version didn't removed the padding adding in the `get_meta` function so in some cases padding was added twice which leaded to a bug. Fixes: sample.aiff Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-06aiff: add explicit goto got_soundMisty De Meo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-04aiff: add support for XA ADPCMMisty De Meo
Certain AIFF files encode XA ADPCM compressed audio using a chunk with the tag `APCM`. Aside from this custom chunk type, they're otherwise standard AIFF files. I've only observed these files in the Sega Saturn game Sonic Jam so far. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-05avformat: fix id3 chaptersLukas Stabe
These changes store id3 chapter data in ID3v2ExtraMeta and introduce ff_id3v2_parse_chapters to parse them into the format context if needed. Encoders using ff_id3v2_read, which previously parsed chapters into the format context automatically, were adjusted to call ff_id3v2_parse_chapters. Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-03-29lavf: fix usages of av_get_codec_tag_string()Clément Bœsch
2017-03-21Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer
* commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
2017-03-17Merge commit '0638b99cdba52554691fc668d9e477bc184c7a33'Matthieu Bouron
* commit '0638b99cdba52554691fc668d9e477bc184c7a33': aiff: Skip padding byte for odd-sized chunks Also removes to odd-size checks from get_aiff_header and get_meta to use the generic path introduced by the original commit. Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2016-12-14avformat: fix overflows during bit rate calculationAndreas Cadhalpun
The bit_rate field has type int64_t since commit 7404f3bdb90e6a5dcb59bc0a091e2c5c038e557d. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-21aiff: check block_align in aiff_read_packetAndreas Cadhalpun
It can be unset in avcodec_parameters_from_context and a value of 0 causes SIGFPE crashes. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-17aiffdec: fix division by zeroAndreas Cadhalpun
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-11lavf/aiffdec: Default to full rate qcelp as QT does.Carl Eugen Hoyos
Fixes decoding of the output file from ticket #4009.
2016-09-30lavf: fix usage of AVIOContext.seekableAnton Khirnov
It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
2016-08-10aiff: Skip padding byte for odd-sized chunksDiego Biurrun
Bug-Id: 660
2016-07-03lavf/aiffdec: Support QDMC demuxing.Carl Eugen Hoyos
2016-04-14avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol
Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-10Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis
* commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-23lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov
Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
2015-11-12aiff: Support demuxing G.722 streamsCarl Eugen Hoyos
2015-10-27avformat/aiff: add ADP4 DVI ADPCM supportPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-26avcodec: add SDX2 DPCM decoderPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-25avformat/aiffdec: give friendly message if compressed codec tag is unsupportedPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-27lavc: Consistently prefix input buffer definesVittorio Giovara
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-06-11avformat/aiffdec: avoid double and ldexp()Michael Niedermayer
There is no support for non integer sample rates, using doubles/floats currently could only lead to rounding differences between platforms Previous version Reviewed-by: Mark Harris <mark.hsj@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19avformat/aiffdec: do not fail if header parser hits EOFMichael Niedermayer
Based on patch by Martin Vignali <martin.vignali@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19avformat/aiffdec: Stop header parsing once a non header packet is reachedMichael Niedermayer
Fix Ticket3530 Based-on debuging work by Martin Vignali <martin.vignali@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-14Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer
* commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e': avformat: Don't anonymously typedef structs Conflicts: libavformat/adtsenc.c libavformat/aiffenc.c libavformat/avidec.c libavformat/gif.c libavformat/iff.c libavformat/img2dec.c libavformat/jvdec.c libavformat/matroskadec.c libavformat/udp.c libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-14avformat: Don't anonymously typedef structsDiego Biurrun