summaryrefslogtreecommitdiffstats
path: root/libavformat/flacdec.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/rawdec: Make the raw packet size configurableMichael Niedermayer2019-07-171-0/+4
| | | | | | | | This allows testing parsers with a wider range of input packet sizes. Which is important and usefull for regression testing, some of our parsers in fact to not work if the packet size is changed from 1024 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-211-2/+2
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* Merge commit 'ed1cd81076434b76f37576d4d806973476a8e96c'Clément Bœsch2017-03-151-9/+20
|\ | | | | | | | | | | | | | | | | | | | | * commit 'ed1cd81076434b76f37576d4d806973476a8e96c': flac demuxer: improve probing Suggested commit very closely matches our code, except with regards to AVPROBE_SCORE_EXTENSION. The code layout is mostly merged but preserves our behaviour. Merged-by: Clément Bœsch <u@pkh.me>
| * flac demuxer: improve probingAnton Khirnov2016-07-311-3/+18
| | | | | | | | | | Extend the probe function to validate the STREAMINFO block that must follow the fLaC ID tag.
* | lavf/flacdec: Return maximum score if the streaminfo header is valid.Carl Eugen Hoyos2017-03-021-1/+8
| |
* | avformat/flacdec: Check avio_read result when reading flac block header.Frank Liberato2017-01-251-1/+2
| | | | | | | | | | | | Return AVERROR_INVALIDDATA if all four bytes aren't present. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/flacdec: Fix seeking close to EOFMichael Niedermayer2016-06-221-3/+6
| | | | | | | | | | | | Fixes Ticket5428 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-9/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | avformat/flacdec: remove unused return code assignmentMichael Niedermayer2015-12-091-3/+3
| | | | | | | | | | | | Fixes CID1271811 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-271-1/+1
| |
* | avformat/flacdec: support fast-seekChing Yi, Chan2015-10-041-1/+59
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lavf/flac: Autodetect raw flac files.Carl Eugen Hoyos2015-04-101-0/+18
| |
* | Merge commit '7784f47762d59e859b4d0f74b3e021ad9368ee2c'Michael Niedermayer2014-11-061-8/+11
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '7784f47762d59e859b4d0f74b3e021ad9368ee2c': lavf: stop using avpriv_flac_parse_streaminfo() Conflicts: libavcodec/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: stop using avpriv_flac_parse_streaminfo()Anton Khirnov2014-11-061-8/+11
| | | | | | | | | | | | 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.
* | Merge commit 'db68ef898a3802e51b6f41fd600d0d46d058e3f8'Michael Niedermayer2014-08-141-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'db68ef898a3802e51b6f41fd600d0d46d058e3f8': ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes. Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.Andrew Stone2014-08-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | replace calls to url_feof() with avio_feof()James Almer2014-08-081-1/+1
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '23f741f79327e31be7b2a75ebb2e02111e06e52f'Michael Niedermayer2014-05-281-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '23f741f79327e31be7b2a75ebb2e02111e06e52f': matroskadec: parse the channel layout mask for FLAC Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * matroskadec: parse the channel layout mask for FLACAnton Khirnov2014-05-281-1/+1
| | | | | | | | It is commonly stored in a vorbiscomment block in codec private data.
* | Merge commit '5fdaf312c5541b77b6364db8b49d6abb416a25c0'Michael Niedermayer2014-05-281-1/+1
|\ \ | |/ | | | | | | | | | | * commit '5fdaf312c5541b77b6364db8b49d6abb416a25c0': flac: make avpriv_flac_parse_block_header() inline Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flac: make avpriv_flac_parse_block_header() inlineAnton Khirnov2014-05-281-1/+1
| | | | | | | | | | | | 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.
* | Merge commit 'd6b9ce99ea384fb676561461768b8316725a4ccd'Michael Niedermayer2014-05-281-0/+15
|\ \ | |/ | | | | | | | | | | * commit 'd6b9ce99ea384fb676561461768b8316725a4ccd': flac demuxer: parse the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flac demuxer: parse the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tagAnton Khirnov2014-05-281-0/+15
| | | | | | | | It is used to store the channel mask for non-standard layouts.
* | avformat/flacdec/flac_read_timestamp: free the correct packetMichael Niedermayer2014-04-161-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/flacdec/flac_read_timestamp: dont modify AVStream stateMichael Niedermayer2014-04-151-8/+12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | flac demuxer: improve seekingRainer Hochecker2014-04-141-0/+45
| |
* | Merge commit '1d55f8d5f6f2cd74fa27170e2be37a72441d9202'Michael Niedermayer2014-04-041-0/+5
|\ \ | |/ | | | | | | | | | | * commit '1d55f8d5f6f2cd74fa27170e2be37a72441d9202': flacdec: export replaygain tags from Vorbis comments Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flacdec: export replaygain tags from Vorbis commentsAlessandro Ghedini2014-04-041-0/+5
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '601d6228c4811d8971a2412a759e1a4ab775ebe8'Michael Niedermayer2013-10-131-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '601d6228c4811d8971a2412a759e1a4ab775ebe8': flac: move picture parsing code in a separate file Conflicts: libavformat/Makefile libavformat/flacdec.c See: 1e5bbbfcf303ec3db0c7db30b85855e2e5358aec Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flac: move picture parsing code in a separate fileJames Almer2013-10-121-130/+2
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavf/flacdec: Share the function to parse cover art blocksJames Almer2013-07-091-128/+2
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'Michael Niedermayer2013-05-051-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e0f8be6413b6a8d334d6052e610af32935c310af': avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate Conflicts: libavformat/ac3dec.c libavformat/avformat.h libavformat/avs.c libavformat/m4vdec.c libavformat/mov.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegvideodec.c libavformat/psxstr.c libavformat/pva.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-041-1/+1
| |
* | Merge commit 'ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6'Michael Niedermayer2013-03-161-5/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit 'ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6': lzo: fix overflow checking in copy_backptr() flacdec: simplify bounds checking in flac_probe() atrac3: avoid oversized shifting in decode_bytes() Conflicts: libavformat/flacdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flacdec: simplify bounds checking in flac_probe()Xi Wang2013-03-151-5/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'Michael Niedermayer2013-03-081-6/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1afddbe59e96af75f1c07605afc95615569f388f': avpacket: use AVBuffer to allow refcounting the packets. Conflicts: libavcodec/avpacket.c libavcodec/utils.c libavdevice/v4l2.c libavformat/avidec.c libavformat/flacdec.c libavformat/id3v2.c libavformat/matroskaenc.c libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-081-6/+7
| | | | | | | | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* | flac_probe: make buffer pointers constMichael Niedermayer2012-12-251-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-5/+5
| |
* | flacdec: fix memleaksPaul B Mahol2012-07-301-20/+19
| | | | | | | | | | | | While here refactor code. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | flacdec: mark as AVSTREAM_PARSE_FULL_RAWMichael Niedermayer2012-07-261-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-081-11/+24
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: cmutils: include shellapi.h on Win32 (for CommandLineToArgvW). x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME). id3v2: add a mimetype for bmp pictures. flacdec: be less strict when parsing attached pictures. flacdec: don't create an attached picture stream until we have all information. Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flacdec: be less strict when parsing attached pictures.Anton Khirnov2012-07-071-7/+18
| | | | | | | | | | | | 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-071-4/+6
| | | | | | | | | | This way we don't end with an invalid stream if parsing the picture fails.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-161-0/+123
|\ \ | |/ | | | | | | | | | | | | * qatar/master: flacdec: read attached pictures. lavf: don't segfault when a NULL filename is passed to avformat_open_input() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flacdec: read attached pictures.Anton Khirnov2012-06-161-0/+123
| |
OpenPOWER on IntegriCloud