Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-19avformat/oggdec: Check for EOF after page headerMichael Niedermayer
Fixes: Infinite loop Fixes: Ticket8594 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit f1589be9fda00c417f9bcccb55dbbea998ee08ac) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-19libavformat/oggdec.c: Check return value from avio_read()John Rummell
If the buffer doesn't contain enough bytes when reading a stream, fail rather than continuing on with unitialized data. Caught by Chromium fuzzers (crbug.com/1054229). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b7c67b1ae3657058b32b9235119d07529ad5cce1) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-21lavf: Constify the probe function argument.Carl Eugen Hoyos
Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
2018-03-07avformat/oggdec: Fix metadata memleak on multiple headersMichael Niedermayer
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>
2017-12-02avformat/oggdec: Respect AVERROR codes returned by ogg parsers.Dale Curtis
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>
2017-11-21Close ogg stream upon error when using AV_EF_EXPLODE.Dale Curtis
Without this there can be multiple memory leaks for unrecognized ogg streams. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-21Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer
* commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
2017-03-02avformat/oggdec: fix leak in ogg_restore()Michael Niedermayer
Fixes: asan_bug_leak Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-02avformat/oggdec: Factor free_stream outMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-02avformat/oggdec: remove unused parameter of ogg_restore()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-09avformat/oggdec: Skip streams in duration correction that did not had their ↵Michael Niedermayer
duration set. Fixes: part of 670190.ogg Fixes integer overflow Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-30lavf: fix usage of AVIOContext.seekableAnton Khirnov
It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
2016-05-11libavformat/oggdec: Free stream private when header parsing fails.Chris Cunningham
Leaking this private structure opens up the possibility that it may be re-used when parsing later packets in the stream. This is problematic if the later packets are not the same codec type (e.g. private allocated during Vorbis parsing, but later packets are Opus and the private is assumed to be the oggopus_private type in opus_header()). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-10Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis
* 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>
2016-03-29fix some a/an typosLou Logan
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-02-23lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov
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.
2015-10-27Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes
2015-10-21lavf: add oggparsedaala and bump microRostislav Pehlivanov
This commit introduces a parser for the current bitstream produced by Daala. It currently bears a large similarity with Theora, another codec produced by Xiph. While likely to change in the future, its basic format of packet parsing should remain fairly identical with its current structure. Once the bitstream freezes, there are a few probable simplifications that could be made. Also, the current version (major, minor and micro) is stuck at zero so it's unusable as a way to warn about possible incompatibilities. This will change once the bitstream freezes, however until then this file is strictly targeting the current git master of the reference encoder, libdaala. This file was developed independently at the same time by both myself and Vittorio Giovara, who used libav as a starting point. For fairness, and to prevent confusion and allegations, his name has been added to the copyright in the license header as well, and vice versa.
2015-07-30avformat/oggdec: ogg_read_seek: reset ogg after seekingMichael Niedermayer
Fixes Ticket4743 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-28Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer
* 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>
2015-07-27lavc: Consistently prefix input buffer definesVittorio Giovara
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-13avformat/oggdec: Check buf before copying data in to itMichael Niedermayer
Fixes null pointer dereference Fixes: aace024653cc62947336b86f8de812ab_signal_sigsegv_a0500f_343_WobblyWindowsIntro.ogg with memlimit 262144 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-04-20Merge commit '656e31ed8728b0c095d037dc9764fc8137c87200'Michael Niedermayer
* commit '656e31ed8728b0c095d037dc9764fc8137c87200': ogg: Forward errors further Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20ogg: Forward errors furtherLuca Barbato
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-20Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer
* commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-19Replace av_dlog with normal av_log at trace levelVittorio Giovara
This applies to every library where performance is not critical.
2015-03-22oggdec: Check memory allocationFederico Tomassetti
Bug-Id: CID 1257798 / CID 1257805 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-22avformat/oggdec: Check for ost allocation failureMichael Niedermayer
Fixes CID1257798 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22avformat/oggdec: Check for av_malloc() failure and forward the error codeMichael Niedermayer
Fixes CID1257805 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-11Merge commit '9deaec782810d098bca11c9332fab2d2f4c5fb78'Michael Niedermayer
* commit '9deaec782810d098bca11c9332fab2d2f4c5fb78': lavf: move internal fields from public to internal context Conflicts: libavformat/avformat.h libavformat/internal.h libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-10lavf: move internal fields from public to internal contextwm4
This is not an API change; the fields were explicitly declared private before. Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-19oggdec: add support for VP8 demuxingJames Almer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-08-30oggdec: fix invalid free on errorwm4
The read_packet callback passes a pointer to a stack-allocated AVPacket. Attempting to free it with av_free() makes no sense. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08replace calls to url_feof() with avio_feof()James Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-27Fix dont and doesnt typosMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-07avformat/oggdec: reset nstreams in closeSchenk, Michael
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06avformat/oggdec/ogg_read_packet(): factorize failure code pathMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06avformat/oggdec: check for av_packet_new_side_data() failureMichael Niedermayer
Fixes CID1197062 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-24oggdec: validate VP8 keyframesJames Almer
Fixes seeking with broken files Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-06ogg: allow streams to update metadataBen Boeckel
Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04avformat/oggdec: dont read timestamps from EOS pages of ogm videosMichael Niedermayer
Some muxers store invalid timestamps there, which breaks seeking Fixes Ticket2739 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30oggdec: add support for VP8 demuxingJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12avformat/oggdec: reset end_trimming when it has been used, so it cannot be ↵Michael Niedermayer
used twice by mistake Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-12avformat/oggdec: reset end_trimming in ogg_reset()Dale Curtis
Fixes the output when seeking back to the start Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-20avformat/oggdec: favor av_freep() over av_free()Michael Niedermayer
Found-by: Reimar Döffinger Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-12oggdec: add support for Opus in Ogg demuxingNicolas George
2013-09-16lavf/ogg: Support for end trimming OpusVignesh Venkatasubramanian
Adding support for end trimming Opus embedded in Ogg container. Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'Michael Niedermayer
* commit 'f369b9356c4606cd4d713d60f7db5de119d901fa': avformat: Use av_reallocp_array() where suitable Conflicts: libavformat/asfenc.c libavformat/gxfenc.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-10avformat: Use av_reallocp_array() where suitableAlexandra Khirnova
Signed-off-by: Diego Biurrun <diego@biurrun.de>