summaryrefslogtreecommitdiff
path: root/libavformat/aiffdec.c
Commit message (Collapse)AuthorAge
* avformat/aiffdec: Check packet sizeMichael Niedermayer2020-11-04
| | | | | | | Fixes: Fixes infinite loop Fixes: 26575/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-5727522236661760 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/id3v2: Remove unnecessary indirectionAndreas Rheinhardt2020-05-25
| | | | | | | | | 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>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-12
| | | | | | | | | | 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>
* avformat/aiffdec: fix signed integer overflowPaul B Mahol2019-09-25
| | | | Fixes #8151
* avformat/aiffdec: parse replaygain metadataMoritz Barsnick2019-09-20
| | | | | | Signed-off-by: Moritz Barsnick <barsnick@gmx.net> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat/aiffdec: AIFF fix in case of ANNOEduard Sinelnikov2018-01-11
| | | | | | | | | | | 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>
* aiff: add explicit goto got_soundMisty De Meo2018-01-06
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aiff: add support for XA ADPCMMisty De Meo2018-01-04
| | | | | | | | | 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>
* avformat: fix id3 chaptersLukas Stabe2017-10-05
| | | | | | | | | | | 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>
* lavf: fix usages of av_get_codec_tag_string()Clément Bœsch2017-03-29
|
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-21
|\ | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-30
| | | | | | | | | | | | | | | | 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.
* | Merge commit '0638b99cdba52554691fc668d9e477bc184c7a33'Matthieu Bouron2017-03-17
|\| | | | | | | | | | | | | | | | | | | * 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>
| * aiff: Skip padding byte for odd-sized chunksDiego Biurrun2016-08-10
| | | | | | | | Bug-Id: 660
* | avformat: fix overflows during bit rate calculationAndreas Cadhalpun2016-12-14
| | | | | | | | | | | | | | | | 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>
* | aiff: check block_align in aiff_read_packetAndreas Cadhalpun2016-10-21
| | | | | | | | | | | | | | | | 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>
* | aiffdec: fix division by zeroAndreas Cadhalpun2016-10-17
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | lavf/aiffdec: Default to full rate qcelp as QT does.Carl Eugen Hoyos2016-10-11
| | | | | | | | Fixes decoding of the output file from ticket #4009.
* | lavf/aiffdec: Support QDMC demuxing.Carl Eugen Hoyos2016-07-03
| |
* | avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol2016-04-14
| | | | | | | | | | | | Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * aiff: Support demuxing G.722 streamsCarl Eugen Hoyos2015-11-12
| |
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avformat/aiff: add ADP4 DVI ADPCM supportPaul B Mahol2015-10-27
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec: add SDX2 DPCM decoderPaul B Mahol2015-10-26
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/aiffdec: give friendly message if compressed codec tag is unsupportedPaul B Mahol2015-10-25
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/aiffdec: avoid double and ldexp()Michael Niedermayer2015-06-11
| | | | | | | | | | | | | | | | 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>
* | avformat/aiffdec: do not fail if header parser hits EOFMichael Niedermayer2015-03-19
| | | | | | | | | | Based on patch by Martin Vignali <martin.vignali@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aiffdec: Stop header parsing once a non header packet is reachedMichael Niedermayer2015-03-19
| | | | | | | | | | | | | | Fix Ticket3530 Based-on debuging work by Martin Vignali <martin.vignali@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
| |
* | avformat/aiffdec: improve readabilityPeter Ross2015-01-09
| | | | | | | | | | Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aiffdec: only read codec tag when there is space in headerPeter Ross2015-01-05
| | | | | | | | | | Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | replace calls to url_feof() with avio_feof()James Almer2014-08-08
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Do not limit blocksize when reading PCM from aiff.Carl Eugen Hoyos2014-06-03
| | | | | | | | Fixes ticket #3695.
* | ff_id3v2_read: add option to limit ID3 magic number searchPeter Ross2014-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 ' chunk tag. If such chunks are stored sequentially, it is possible for the ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g. [1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] [2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...] Fixes ticket #3530. Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aiffdec: use ff_get_extradata()Michael Niedermayer2013-12-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix decoding of G.726 in AIFF.Carl Eugen Hoyos2013-10-18
| | | | | | | | Fixes ticket #1973.
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-13
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Support decoding G.722 in aiff.Carl Eugen Hoyos2013-06-09
| |
* | Read block_align from extradata when decoding qclp in aiff.Carl Eugen Hoyos2013-04-23
| | | | | | | | Fixes ticket #1287.
* | Skip padding in an id3 tag in aiff files.Carl Eugen Hoyos2013-04-03
| | | | | | | | | | | | Fixes ticket #2430. Reviewed-by: Matthieu Bouron
* | aiffdec: set block duration for QDM2Piotr Bandurski2013-01-01
| | | | | | | | Fixes #1697.
* | aiffdec: read ID3 attached picturesMatthieu Bouron2012-10-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/aiffdec: don't stop parsing after SSND chunkMatthieu Bouron2012-10-22
| | | | | | | | | | | | Some file has ID3 chunk placed after SSND. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | isom: fix redundant redeclaration of ff_mov_read_chan().Clément Bœsch2012-10-02
| | | | | | | | | | Silence a GCC warning. A leftover of the disabled version is still available in lavf/isom.c.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mov_chan: Pass a separate AVIOContext for reading af_asyncts: check return value from lavr when flushing. mss2: simplify loop in decode_rle() mss12: avoid unnecessary division in arith*_get_bit() mss2: do not try to read too many palette entries mpegvideo: set AVFrame fields to NULL after freeing the base memory configure: Set the right cc_e flags for msvc Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | aiffdec: support QDM2Michael Niedermayer2012-08-28
| | | | | | | | | | | | Fixes ticket204 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>