summaryrefslogtreecommitdiff
path: root/libavformat/aadec.c
Commit message (Collapse)AuthorAge
* avformat/aadec: Check toc_size to contain the minimum to demuxer usesMichael Niedermayer2020-05-21
| | | | | | | | Fixes: out of array access Fixes: stack-buffer-overflow-READ-0x0831fff1 Found-by: GalyCannon <galycannon@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aadec: Check for scanf() failureMichael Niedermayer2019-04-24
| | | | | | | | Fixes: use of uninitialized variables Fixes: blank.aa Found-by: Chamal De Silva <chamal.desilva@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
* aadec: improve seeking in mp3 contentKarsten Otto2018-07-14
| | | | | | | | | | | | MP3 frames may not be aligned to aa chunk boundaries. When seeking, calculate the expected frame offset in the target chunk. Adjust the timestamp and truncate the next packet accordingly. This solution works for the majority of tested audio material. For some rare encodings with mp3 padding or embedded id3 tags, it will mispredict the correct offset, and at worst skip an extra frame. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aadec: add chapters and seekingKarsten Otto2018-07-09
| | | | | | | | | | | | | | | read_packet reads content in chunks. Thus seek must be clamped to valid chunk positions in the file, which in turn are relative to chapter start positions. So in read_header, scan for chapter headers once by skipping through the content. Set stream time_base based on bitrate in bytes/s, for easy timestamp to position conversion. Then in read_seek, find the chapter containing the seek position, calculate the nearest chunk position, and reinit the read_seek state accordingly. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aadec: improve eof detectionKarsten Otto2018-07-08
| | | | | | | | | Remember the end position of audio content in the file and check it during read_packet. There always seems to be other data beyond it, which could be misinterpreted as more audio. Also add some extra avio_read error checks, to bail early in case of a broken/truncated file. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-29
|
* avformat/aadec: use avio_get_str()Paul B Mahol2017-01-16
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/aadec: stop ignoring file metadataPaul B Mahol2017-01-16
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec: add SIPR parserPaul B Mahol2017-01-16
| | | | | | Fixes #2056. 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>
* avformat/aa: initialize "header_seed" and "header_key"Vesselin Bontchev2015-09-10
| | | | | | Fixes CID 1322364, CID 1322363 Signed-off-by: Vesselin Bontchev <vesselin.bontchev@yandex.com>
* avformat/aa: use correct format specifier in sscanfVesselin Bontchev2015-08-25
| | | | | | This demuxer was broken on a large number of platforms due to usage of wrong format specifier in sscanf. This patch fixes the problem, and also adds some debug logging to reduce future debugging pain.
* Add support for Audible AA filesVesselin Bontchev2015-08-21
https://en.wikipedia.org/wiki/Audible.com#Quality