summaryrefslogtreecommitdiff
path: root/libavformat/flacdec.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>
* lavf: stop using avpriv_flac_parse_streaminfo()Anton Khirnov2014-11-06
| | | | | | The only parameters needed by the demuxers are the sample rate and sample count, which can be trivially extracted manually, without resorting to an avpriv function.
* ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.Andrew Stone2014-08-13
| | | | | | | | | | | | | | Originally, AVFormatContext and a metadata dict were provided to ff_vorbis_comment(), but this presented issues if an AVStream was being updated or the metadata on AVFormatContext wasn't actually being updated. To remedy this, ff_vorbis_stream_comment() explicitly updates a stream's metadata and sets any necessary flags. ff_vorbis_comment() does not modify any flags, and any calls to it that update AVFormatContext's metadata (just a single call) must also update AVFormatContext.event_flags after detecting any metadata changes to the provided dictionary, as signaled by a positive return value. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* matroskadec: parse the channel layout mask for FLACAnton Khirnov2014-05-28
| | | | It is commonly stored in a vorbiscomment block in codec private data.
* flac: make avpriv_flac_parse_block_header() inlineAnton Khirnov2014-05-28
| | | | | | This avoids all the ABI troubles associated with avpriv_. Since this function is very small and does not depend on any tables, making it inline should have no adverse effects.
* flac demuxer: parse the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tagAnton Khirnov2014-05-28
| | | | It is used to store the channel mask for non-standard layouts.
* flacdec: export replaygain tags from Vorbis commentsAlessandro Ghedini2014-04-04
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* flac: move picture parsing code in a separate fileJames Almer2013-10-12
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-04
|
* flacdec: simplify bounds checking in flac_probe()Xi Wang2013-03-15
| | | | | | | | | | | Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'. Avoid a possible out-of-bounds pointer, which is undefined behavior in C. CC: libav-stable@libav.org Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* flacdec: be less strict when parsing attached pictures.Anton Khirnov2012-07-07
| | | | | | Only return an error if memory allocation fails or error recognition is set to explode. Otherwise just print an error message and continue reading the file.
* flacdec: don't create an attached picture stream until we have all information.Anton Khirnov2012-07-07
| | | | | This way we don't end with an invalid stream if parsing the picture fails.
* flacdec: read attached pictures.Anton Khirnov2012-06-16
|
* 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>
* lavf: rename AVInputFormat.value to raw_codec_id.Anton Khirnov2012-01-31
| | | | It's only used by raw demuxers for storing the codec id.
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* flacdec: skip all track indices at once instead of looping.Paul B Mahol2011-12-21
| | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* flacdec: Support for tracks in cuesheet metadata blockPaul B Mahol2011-12-10
| | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* 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 flac symbols used in lavf.Anton Khirnov2011-10-20
| | | | | Specifically, ff_flac_parse_streaminfo, ff_flac_is_extradata_valid and ff_flac_parse_block_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.
* 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: deprecate url_feofAnton Khirnov2011-03-07
| | | | | | AVIOContext.eof_reached should be used directly instead. 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.
* Export metadata in the generic format. Deprecate old conversion API.Anton Khirnov2010-10-15
| | | | | | patch by Anton Khirnov anton _at_ khirnov _dot_ net Originally committed as revision 25493 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move handling of ID3v2 to common utils.c code, reducing code duplicationReimar Döffinger2010-10-06
| | | | | | and supporting it for more formats, fixing issue 2258. Originally committed as revision 25378 to svn://svn.ffmpeg.org/ffmpeg/trunk
* split raw.c into rawdec.c and rawenc.cAurelien Jacobs2010-08-30
| | | | Originally committed as revision 24997 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Generalize ID3v2 functions to support ID3v2-like ID headers with aMichael Karcher2010-06-11
| | | | | | | | | different magic in the header (mainly targeted to Sony's .oma/.aa3 format). Patch by Michael Karcher, ffmpeg A mkarcher dialup fu-berlin de Originally committed as revision 23583 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 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
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add VorbisComment writing to FLAC files.James Darnley2010-03-20
| | | | | | Patch by James Darnley <james darnley at gmail>. Originally committed as revision 22605 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace all the occurrences of AVERROR_EIO with AVERROR(EIO), and markStefano Sabatini2010-03-13
| | | | | | AVERROR_EIO for deletion at the next major bump. Originally committed as revision 22513 to svn://svn.ffmpeg.org/ffmpeg/trunk
* oggdec: Metadata is per-stream; don't merge multiple streams' togetherDavid Conrad2010-03-12
| | | | Originally committed as revision 22473 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add ff_ prefix to vorbis_commentDavid Conrad2010-03-12
| | | | Originally committed as revision 22472 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a VorbisComment metadata conversion table and use it in the FLAC andJustin Ruggles2009-06-13
| | | | | | Ogg demuxers. Originally committed as revision 19186 to svn://svn.ffmpeg.org/ffmpeg/trunk
* seek backwards 4 bytes if 'fLaC' marker is not foundJustin Ruggles2009-03-21
| | | | Originally committed as revision 18086 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flacdec: Parse the metadata header in the raw FLAC demuxer.Justin Ruggles2009-03-06
| | | | Originally committed as revision 17852 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: indentationJustin Ruggles2009-02-28
| | | | Originally committed as revision 17662 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Separate the raw FLAC demuxer from raw.c and put in a new file,Justin Ruggles2009-02-28
flacdec.c. Originally committed as revision 17660 to svn://svn.ffmpeg.org/ffmpeg/trunk