summaryrefslogtreecommitdiffstats
path: root/libavformat/oggdec.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-211-3/+3
|\ | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-301-1/+1
| | | | | | | | | | | | | | | | 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.
* | avformat/oggdec: fix leak in ogg_restore()Michael Niedermayer2017-03-021-1/+5
| | | | | | | | | | | | | | Fixes: asan_bug_leak Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/oggdec: Factor free_stream outMichael Niedermayer2017-03-021-7/+16
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/oggdec: remove unused parameter of ogg_restore()Michael Niedermayer2017-03-021-8/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/oggdec: Skip streams in duration correction that did not had their ↵Michael Niedermayer2016-12-091-0/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | libavformat/oggdec: Free stream private when header parsing fails.Chris Cunningham2016-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | fix some a/an typosLou Logan2016-03-281-1/+1
| | | | | | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* | Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-271-1/+1
| |
* | lavf: add oggparsedaala and bump microRostislav Pehlivanov2015-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | avformat/oggdec: ogg_read_seek: reset ogg after seekingMichael Niedermayer2015-07-291-0/+1
| | | | | | | | | | | | Fixes Ticket4743 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-5/+5
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avformat/oggdec: Check buf before copying data in to itMichael Niedermayer2015-07-131-2/+10
| | | | | | | | | | | | | | | | 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>
* | Merge commit '656e31ed8728b0c095d037dc9764fc8137c87200'Michael Niedermayer2015-04-201-3/+6
|\ \ | |/ | | | | | | | | | | * commit '656e31ed8728b0c095d037dc9764fc8137c87200': ogg: Forward errors further Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: Forward errors furtherLuca Barbato2015-04-201-5/+14
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-201-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-191-4/+4
| | | | | | | | This applies to every library where performance is not critical.
| * oggdec: Check memory allocationFederico Tomassetti2015-03-211-0/+5
| | | | | | | | | | | | Bug-Id: CID 1257798 / CID 1257805 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/oggdec: Check for ost allocation failureMichael Niedermayer2015-02-221-2/+12
| | | | | | | | | | Fixes CID1257798 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec: Check for av_malloc() failure and forward the error codeMichael Niedermayer2015-02-221-2/+8
| | | | | | | | | | | | Fixes CID1257805 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9deaec782810d098bca11c9332fab2d2f4c5fb78'Michael Niedermayer2015-02-111-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: move internal fields from public to internal contextwm42015-02-101-3/+3
| | | | | | | | | | | | | | This is not an API change; the fields were explicitly declared private before. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * oggdec: add support for VP8 demuxingJames Almer2014-12-181-0/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | oggdec: fix invalid free on errorwm42014-08-301-1/+0
| | | | | | | | | | | | | | 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>
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-151-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * oggdec: add support for Opus in Ogg demuxingNicolas George2013-10-121-0/+1
| |
* | 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>
* | Fix dont and doesnt typosMichael Niedermayer2014-04-271-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec: reset nstreams in closeSchenk, Michael2014-04-071-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec/ogg_read_packet(): factorize failure code pathMichael Niedermayer2014-04-061-10/+9
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec: check for av_packet_new_side_data() failureMichael Niedermayer2014-04-061-0/+5
| | | | | | | | | | Fixes CID1197062 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: validate VP8 keyframesJames Almer2014-02-241-2/+10
| | | | | | | | | | | | | | Fixes seeking with broken files Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ogg: allow streams to update metadataBen Boeckel2014-02-051-0/+14
| | | | | | | | | | Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec: dont read timestamps from EOS pages of ogm videosMichael Niedermayer2014-01-041-0/+5
| | | | | | | | | | | | | | Some muxers store invalid timestamps there, which breaks seeking Fixes Ticket2739 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggdec: add support for VP8 demuxingJames Almer2013-12-301-0/+1
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec: reset end_trimming when it has been used, so it cannot be ↵Michael Niedermayer2013-12-121-0/+1
| | | | | | | | | | | | used twice by mistake Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec: reset end_trimming in ogg_reset()Dale Curtis2013-12-121-0/+1
| | | | | | | | | | | | Fixes the output when seeking back to the start Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggdec: favor av_freep() over av_free()Michael Niedermayer2013-10-191-4/+4
| | | | | | | | | | Found-by: Reimar Döffinger Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/ogg: Support for end trimming OpusVignesh Venkatasubramanian2013-09-161-0/+13
| | | | | | | | | | | | | | | | 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>
* | Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'Michael Niedermayer2013-09-111-10/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * 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>
| * avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-101-10/+6
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * ogg: Fix potential infinite discard loopReimar Döffinger2013-08-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Seeking in certain broken files would cause ogg_read_timestamp to fail because ogg_packet would go into a state where all packets of stream 1 would be discarded until the end of the stream. Bug-Id: 553 CC: libav-stable@libav.org Signed-off-by: Jan Gerber <j@v2v.cc> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-021-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * qatar/master: oggdec: do not fall back on binary search in the generic code. Conflicts: libavformat/oggdec.c tests/ref/seek/lavf-ogg Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggdec: do not fall back on binary search in the generic code.Anton Khirnov2013-07-021-1/+1
| | | | | | | | | | Binary search is already attempted in the format-specific seek function, so the fallback is only reached if binary search failed already.
* | Merge commit 'f963f701d90bd7bb03e39aab4e59bd137084e082'Michael Niedermayer2013-06-231-1/+6
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'f963f701d90bd7bb03e39aab4e59bd137084e082': ogg: relax demuxer conformance checks Conflicts: libavformat/oggdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: relax demuxer conformance checksLuca Barbato2013-06-221-2/+5
| | | | | | | | | | Some samples in the wild are missing headers that are expected by the specification but in practice do not affect decoding.
* | oggdec: Support byte based seekingMichael Niedermayer2013-04-041-0/+5
| | | | | | | | | | | | Fixed Ticket2317 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud