summaryrefslogtreecommitdiff
path: root/libavformat/oggparsevorbis.c
Commit message (Collapse)AuthorAge
* lavf/oggparsevorbis: Use case-insensitive key compare for vorbis pictureMattias Wadman2020-04-11
| | | | | | | Regression since 8d3630c5402fdda2889fe4f74f7dcdd50ebca654 where keys were changed to not be touppered but the picture block strcmp was not changed to be case-insensitive. Fixes ticket #8608.
* avformat/oggparsevorbis: Use AV_DICT_DONT_STRDUP_VAL to avoid av_strdupAndreas Rheinhardt2020-01-17
| | | | | | | | | | | | | This will likely also fix CID 1452427, a false positive resulting from Coverity thinking that av_dict_set() automatically frees its key and value parameters (even without the AV_DICT_DONT_STRDUP_* flags). (AV_DICT_APPEND and AV_DICT_DONT_STRDUP_VAL are compatible with each other since a8c5b455, so we can reset this flag here. It has originally been removed in 0dc66553 when appending was added.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/oggparsevorbis: Fix change the case of metadata keys issueJun Zhao2019-04-22
| | | | | | | | | | | The spec in https://xiph.org/vorbis/doc/v-comment.html states that the metadata keys are case-insensitive, so don't change the case and update the fate test case. Fix #7784 Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* libavformat/oggparsevorbis: Fix memleak on multiple headersMichael Niedermayer2018-03-07
| | | | | | | Fixes: Chromium bug 800123 Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggdec: Respect AVERROR codes returned by ogg parsers.Dale Curtis2017-12-02
| | | | | | | | | | | | Fixes ticket #6804. All of the ogg header and packet parsers may return standard AVERROR codes; these return values should not be treated as success. Additionally changes oggparsevorbis, to not give up too early with certain types of poorly muxed files. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '5c31eaa9998b2185e0aa04d11adff128498dc14a'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '5c31eaa9998b2185e0aa04d11adff128498dc14a': Remove unnecessary get_bits.h #includes and add missing headers where needed. Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Remove unnecessary get_bits.h #includes and add missing headers where needed.Alexandra Hájková2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/oggparsevorbis: free base64 encoded data immediately after decoding itJames Almer2016-06-20
| | | | | | | | | | | | | | It has no use afterwards and freeing it before calling ff_flac_parse_picture() may help prevent OOM issues on memory constrained scenarios. Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/oggparsevorbis: use the base64 decode size macroJames Almer2016-06-20
| | | | | | | | | | | | | | Allocate the memory needed for the decoded data rather than the encoded data. Signed-off-by: James Almer <jamrial@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>
| * 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.
* | Merge commit '41ed749fe987e60b0485fa721ad869590651324d'Hendrik Leppkes2015-09-12
|\| | | | | | | | | | | | | * commit '41ed749fe987e60b0485fa721ad869590651324d': ogg: Do not try to use the parser if it is not present Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * ogg: Do not try to use the parser if it is not presentLuca Barbato2015-09-10
| | | | | | | | | | Bug-Id: 886 CC: libav-stable@libav.org
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avformat/oggparsevorbis: Check that initialization succeeded before ↵Michael Niedermayer2014-11-06
| | | | | | | | | | | | declaring the end of headers Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggparsevorbis: return proper error code from vorbis_header()Michael Niedermayer2014-11-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2f3fadfbe3c6ad52fad5c614b6067c5401227959'Michael Niedermayer2014-11-06
|\| | | | | | | | | | | | | | | | | | | * commit '2f3fadfbe3c6ad52fad5c614b6067c5401227959': lavc,lavf: switch to the new vorbis parse API Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc,lavf: switch to the new vorbis parse APIAnton Khirnov2014-11-06
| |
* | Merge commit '5e80fb7ff226f136dbcf3fed00a2966bf8e9bd70'Michael Niedermayer2014-11-06
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '5e80fb7ff226f136dbcf3fed00a2966bf8e9bd70': lavc: add a public API for parsing vorbis packets. Conflicts: doc/APIchanges libavcodec/Makefile libavcodec/version.h libavcodec/vorbis_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: add a public API for parsing vorbis packets.Anton Khirnov2014-11-06
| | | | | | | | | | | | It is required by (at least) the ogg demuxer. Mark the current semi-public apriv API for removal.
* | Merge commit '6896f95b2483e52e717e2c75a4fd24fcb0e14b67'Michael Niedermayer2014-11-06
|\| | | | | | | | | | | | | | | | | | | * commit '6896f95b2483e52e717e2c75a4fd24fcb0e14b67': vorbis_parser: add an AV prefix to VorbisParseContext Conflicts: libavcodec/vorbis_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vorbis_parser: add an AV prefix to VorbisParseContextAnton Khirnov2014-11-06
| | | | | | | | This is done in preparation for making it public.
* | Merge commit 'db68ef898a3802e51b6f41fd600d0d46d058e3f8'Michael Niedermayer2014-08-14
|\| | | | | | | | | | | | | | | | | | | * 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-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>
* | avformat/oggparsevorbis: Dont attempt to calculate timestamps from gp=0Michael Niedermayer2014-06-11
| | | | | | | | | | | | Fixes Ticket3710 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '23f741f79327e31be7b2a75ebb2e02111e06e52f'Michael Niedermayer2014-05-28
|\| | | | | | | | | | | | | | | | | | | * 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-28
| | | | | | | | It is commonly stored in a vorbiscomment block in codec private data.
* | Use correct msvc type specifiers for ptrdiff_t and size_t.Carl Eugen Hoyos2014-04-24
| | | | | | | | | | | | | | The Windows runtime aborts if it finds %t or %z. Fixes ticket #3472. Reviewed-by: Ronald Bultje
* | avformat/oggparsevorbis: remove non functional null checkMichael Niedermayer2014-04-06
| | | | | | | | | | | | Fixes CID1197055 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '0048deb84cb6d22ba7f4fd7c8b4ecc054fcc22d4'Michael Niedermayer2014-04-04
|\| | | | | | | | | | | | | | | | | | | | | * commit '0048deb84cb6d22ba7f4fd7c8b4ecc054fcc22d4': oggparsevorbis: export replaygain tags from Vorbis comments Conflicts: libavformat/Makefile libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggparsevorbis: export replaygain tags from Vorbis commentsAlessandro Ghedini2014-04-04
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/oggparsevorbis: dont use invalid granulesMichael Niedermayer2014-03-05
| | | | | | | | | | | | Fixes Ticket3437 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggparsevorbis: check packet size before reading new_len from itMichael Niedermayer2014-03-02
| | | | | | | | | | | | | | Fixes out of array read Fixes: 34260c7981118fb38fba61809bf4dd5a-asan_heap-oob_93b923_1508_cov_951051643_DivX640x480_oggvorbis.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec/vorbis: fix stream duration conditionHendrik Leppkes2014-02-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vorbis: extract metadata from the middle of a streamBen Boeckel2014-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | If a special comment packet shows up in the middle of the stream, we should extract it out into the vorbis stream metadata dictionary. Also, if there is metadata in the packet on the way in, it might linger since we only add data to the dictionary causing stale metadata to be inserted into the stream. Instead, clear it to remove any doubt about what is new and old. Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | vorbis: append data from tags togetherBen Boeckel2014-02-05
| | | | | | | | | | | | | | | | Currently, if there are multiple 'performer' tags, the last one is the only one which appears. Instead, join them with a semicolon. Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fd2384f02b905a106fba9222ece4ddbe2ec61937'Michael Niedermayer2013-10-13
|\| | | | | | | | | | | | | * commit 'fd2384f02b905a106fba9222ece4ddbe2ec61937': oggparsevorbis: fail on memory allocation error Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggparsevorbis: fail on memory allocation errorVittorio Giovara2013-10-12
| |
* | Merge commit 'c18375ec8040a9fe0f186b2033dc975883143758'Michael Niedermayer2013-10-13
|\| | | | | | | | | | | | | | | | | | | | | * commit 'c18375ec8040a9fe0f186b2033dc975883143758': oggvorbisdec: add support for embedded cover art Conflicts: libavformat/oggparsevorbis.c See: 193782216fc8179ec92d498449be0a51e4c7c658 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggvorbisdec: add support for embedded cover artJames Almer2013-10-12
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '601d6228c4811d8971a2412a759e1a4ab775ebe8'Michael Niedermayer2013-10-13
|\| | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge commit 'ed9245dba83f9add60f55718b537b0af2105c60e'Michael Niedermayer2013-10-13
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'ed9245dba83f9add60f55718b537b0af2105c60e': oggparsevorbis: check allocations Conflicts: libavformat/oggparsevorbis.c See: 033f1644b59abd755bb529afa5db394d18d9c30b See: 84aea80f7824c23b4cbf101f03e2b5b418a79d80 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggparsevorbis: check allocationsVittorio Giovara2013-10-12
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '9c15ef35d404fca2adc31276c1eedb11cf485461'Michael Niedermayer2013-10-13
|\| | | | | | | | | | | | | | | | | | | | | * commit '9c15ef35d404fca2adc31276c1eedb11cf485461': oggparsevorbis: support official chapter extension Conflicts: libavformat/oggparsevorbis.c See: 04b9836274f390e39879c2666f7967990f0382cc Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggparsevorbis: support official chapter extensionJames Almer2013-10-12
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-06
|\| | | | | | | | | | | | | | | | | | | * qatar/master: oggparsevorbis: return meaningful errors Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggparsevorbis: return meaningful errorsVittorio Giovara2013-10-05
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | | | | | | | * commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48': oggparsevorbis: K&R formatting cosmetics Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggparsevorbis: K&R formatting cosmeticsVittorio Giovara2013-10-03
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>