summaryrefslogtreecommitdiff
path: root/libavformat/mp3dec.c
Commit message (Collapse)AuthorAge
* Mark read-only tables as staticDiego Biurrun2016-05-05
|
* 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.
* mp3dec: replace avpriv_mpa_decode_header with avpriv_mpegaudio_decode_headerAnton Khirnov2015-12-12
| | | | | The latter does not require a full AVCodecContext and still provides all the functionality needed here.
* mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_headerAnton Khirnov2015-12-12
| | | | | | Almost all the places from which this function is called already check the header manually and in the two that don't (the mp3 muxer) the check should not cause any problems.
* mp3: Forward seeking errorsLuca Barbato2015-07-13
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mp3: Make the seek more robustLuca Barbato2015-07-11
| | | | | | Try to parse up to 4 packets to find the closest packet. Reported-By: jan.schlueter@ofai.at
* mp3: Properly use AVCodecContext APIVittorio Giovara2015-03-11
| | | | | | | Rather than having an unitialized context on the stack, allocate it with defaults and free it when unneeded. CC: libav-stable@libav.org
* mp3: Tweak the probe scoresLuca Barbato2014-12-07
| | | | | | | | Having more than 10 consecutive frames decoded as mp3 should be considered a clear signal that the sample is mp3 and not mpegps. Reported-By: Florian Iragne <florian@iragne.fr> CC: libav-stable@libav.org
* mp3dec: fix reading the Xing tagAnton Khirnov2014-10-24
| | | | | | | The quality scale field is only supposed to be present if the fourth bit is set. In practice, lame always sets it, but other tools might not. CC:libav-stable@libav.org
* mp3dec: decode more data from Info headerAlessandro Ghedini2014-04-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mp3dec: move XING/Info and VBRI parsing into their own functionsAlessandro Ghedini2014-04-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mp3dec: export replaygain tags from ID3v2Anton Khirnov2014-03-24
|
* mp3: add .mpa extensionVittorio Giovara2013-09-12
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-04
|
* mp3dec: fallback to generic seeking when a TOC is not presentMichael Niedermayer2013-04-19
| | | | | | | Fixes seeking without a Xing/Info header. CC: libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mp3dec: Fix VBR bit rate parsingAlexander Kojevnikov2013-03-08
| | | | | | | | | | | | When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag. When parsing the stream, don't override the bit rate if it's already set, otherwise calculate the mean bit rate from parsed frames. This way, the bit rate will be set correctly both for CBR and VBR streams. CC:libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mp3dec: read Xing frame TOC indexAnton Khirnov2012-09-19
|
* mp3dec: use named constants for Xing header flagsAnton Khirnov2012-09-19
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
|
* mp3dec: forward errors for av_get_packet().Anton Khirnov2012-07-28
| | | | | | | Don't invent a bogus EIO error. The code now doesn't check for ret == 0, but that check is redundant, av_get_packet() never returns 0.
* mp3dec: remove a pointless local variable.Anton Khirnov2012-07-28
|
* mp3dec: remove commented out cruft.Anton Khirnov2012-07-28
|
* mp3/ac3 probe: search for PES headers to prevent probing MPEG-PS as MP3.Ronald S. Bultje2012-05-30
|
* cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-06
| | | | | | | Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
* mp3dec: Fix reading file size and frames in VBRI headersIngo Brückl2012-03-01
| | | | | | | | The fields "Number of Bytes" and "Number of Frames" are mixed up. "Bytes" come first, "Frames" behind. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Alex Converse <alex.converse@gmail.com>
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.Anton Khirnov2011-10-20
| | | | | Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header, ff_mpegaudio_decode_header.
* lavf,lavd: replace av_new_stream->avformat_new_stream part I.Anton Khirnov2011-10-19
| | | | | Trivial replacements with sed are done in this commit: sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
* lavf: use designated initialisers for all (de)muxers.Anton Khirnov2011-07-17
| | | | It's more readable and less prone to breakage.
* Do not include mathematics.h in avutil.hMans Rullgard2011-07-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-08
|
* lavf: replace some more avio_seek(SEEK_CUR) with avio_skipAnton Khirnov2011-03-20
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes senseAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: add avio_tell macro as a replacement for url_ftellAnton Khirnov2011-03-04
| | | | 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>
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.
* Move ID3v1 skip from decoder to demuxerClément Bœsch2011-01-22
| | | | Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
* Split mp3 demuxer and muxer into separate files.Anton Khirnov2011-01-21
Signed-off-by: Mans Rullgard <mans@mansr.com>