summaryrefslogtreecommitdiff
path: root/libavformat/apetag.c
Commit message (Collapse)AuthorAge
* 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.
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* ape: Use the proper variable typeLuca Barbato2015-02-15
| | | | | | | Avoid an unsigned underflow. Bug-Id: 1041122 CC: libav-stable@libav.org
* apetag: Fix APE tag size checkKaterina Barone-Adesi2014-09-17
| | | | | | | | | | The size variable is (correctly) unsigned, but is passed to several functions which take signed parameters, such as avio_read, sometimes after having numbers added to it. So ensure that size remains within the bounds that these functions can handle. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: more correct printf format specifiersDiego Biurrun2014-03-11
|
* apetag: use int64_t for filesizeAnton Khirnov2013-06-04
| | | | CC: libav-stable@libav.org
* apetag: add support for writing APE tagsAnton Khirnov2013-05-28
| | | | This will be useful in the WavPack muxer.
* apetag: fix error handling in ff_ape_parse_tag()Xi Wang2012-11-21
| | | | | | | | | | | | | | | | | | | | The following error handling is broken due to signedness. int file_size; uint32_t tag_bytes; int64_t tag_start; ... tag_start = file_size - tag_bytes - APE_TAG_FOOTER_BYTES; if (tag_start < 0) { ... } Note that tag_bytes is unsigned, which makes the right-hand side of `tag_start = ...' unsigned, too. The 32-bit unsigned value is then zero-extended to 64 bits. Therefore, tag_start must be non-negative, and the check (tag_start < 0) is always false, which breaks the error handling. This patch fixes the check. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* apetag: change a forgotten return to return 0Anton Khirnov2012-07-31
|
* wv,mpc8: don't return apetag data in packets.Anton Khirnov2012-07-31
|
* apetag: reindentAnton Khirnov2012-07-02
|
* apetag: export attached covers as video streams.Anton Khirnov2012-07-02
|
* apetag: fix the amount of data read from binary tags.Anton Khirnov2012-07-02
| | | | Substract the filename size from the data size.
* apetag: make sure avio_get_str() doesn't read more than it should.Anton Khirnov2012-07-02
|
* apetag: do not leak memory if avio_read() failsPaul B Mahol2012-02-23
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* apetag: propagate errors.Ronald S. Bultje2012-02-23
| | | | | | | Fixes crashes if reading the tag value fails. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* apetag: add proper support for binary tagsPaul B Mahol2012-02-17
| | | | | | | export as attachment streams Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-08
|
* Replace custom DEBUG preprocessor trickery by the standard one.Diego Biurrun2011-06-03
|
* Remove unused variablesMans Rullgard2011-06-02
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* avio: avio_ prefix for url_fsizeAnton Khirnov2011-03-07
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefix for url_fseekAnton Khirnov2011-03-01
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefixes for get_* functionsAnton Khirnov2011-02-21
| | | | | | | | | | | | | | In the name of consistency: get_byte -> avio_r8 get_<type> -> avio_r<type> get_buffer -> avio_read get_partial_buffer will be made private later get_strz is left out becase I want to change it later to return something useful. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-20
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace all remaining occurrences of AVERROR_NOMEM withStefano Sabatini2010-04-03
| | | | | | | | | AVERROR(ENOMEM). AVERROR_NOMEM is deprecated and will be dropped at the next libavutil major bump. Originally committed as revision 22791 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Include apetag.h which contains the prototype for ff_ape_parse_tag().Carl Eugen Hoyos2010-02-28
| | | | Originally committed as revision 22096 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove unused variable, fixes the warning:Diego Biurrun2009-12-15
| | | | | | libavformat/apetag.c:38: warning: unused variable `l' Originally committed as revision 20878 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use AV_METADATA_DONT_STRDUP* / use av_malloced metadata instead of strdupedMichael Niedermayer2009-12-13
| | | | | | | arrays of fixed length. Code from ffmbc with changes to adapt to our metadata API. Originally committed as revision 20836 to svn://svn.ffmpeg.org/ffmpeg/trunk
* remove old and useless debug codeAurelien Jacobs2009-10-18
| | | | | | | It uses the old, deprecated metadata API and prints exactly the same thing as what ffmpeg/ffplay does. Originally committed as revision 20280 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move APE tag parsing into separate module.Kostya Shishkov2009-08-11
Based on patch by Matti Hamalainen (mhamalai<mot>students<punkt>oamk<punkt>) Originally committed as revision 19629 to svn://svn.ffmpeg.org/ffmpeg/trunk