summaryrefslogtreecommitdiff
path: root/libavformat/oggparsetheora.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>
* 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.
* oggparsetheora: stop using deprecated avcodec_set_dimensionsAnton Khirnov2013-10-31
|
* oggparsetheora: check av_mallocz resultAnton Khirnov2013-10-30
|
* oggparsetheora: return meaningful error codesAnton Khirnov2013-10-30
|
* oggparsetheora: K&R cosmetics, reformatAnton Khirnov2013-10-30
| | | | | | | | Also typedef the private data struct and make its name consistent with the rest of Libav. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: Reset the entry count and allocation size variables on av_reallocp ↵Martin Storsjö2013-09-26
| | | | | | | | | | | | | | failures When av_reallocp fails, the associated variables that keep track of the number of elements in the array (and in some cases, the separate number of allocated elements) need to be reset. Not all of these might technically be needed, but it's better to reset them if in doubt, to make sure variables don't end up conflicting. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* oggparsetheora: fix comment header parsingGiorgio Vazzana2013-01-14
| | | | | | Pass the correct header size to ff_vorbis_comment() Signed-off-by: Martin Storsjö <martin@martin.st>
* oggparsetheora: make it more robustLuca Barbato2012-09-24
|
* ogg: prevent NULL pointer deference in theora gptoptsMichael Niedermayer2012-09-24
| | | | | | | | Additional safety in case a special ogg stream is crafted with the proper number of Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ogg: check that the expected number of headers had been parsedLuca Barbato2012-09-24
| | | | Not having the header for a codec is a tell-tale of a broken file.
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* ogg: don't set codec timebaseAnton Khirnov2012-03-02
| | | | Demuxers are not supposed to set it.
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* Always use av_set_pts_info to set the stream time base.Reimar Döffinger2011-02-06
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.Jean-Daniel Dupas2010-03-31
| | | | | | Patch by Jean-Daniel Dupas, devlists shadowlab org Originally committed as revision 22744 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
* 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
* oggdec: Parse theora headers since ogg might not mark keyframesDavid Conrad2010-03-05
| | | | | | Fixes issue746 Originally committed as revision 22214 to svn://svn.ffmpeg.org/ffmpeg/trunk
* oggdec: Set dts when knownDavid Conrad2010-01-11
| | | | Originally committed as revision 21134 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace invalid Theora frame rate by 25 FPS.Reimar Döffinger2009-07-03
| | | | | | Avoids division by 0 due to e.g. time_base denominator being 0. Originally committed as revision 19334 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Ensure that the extradata buffer is padded appripriately in the ogg demuxer.David Conrad2009-06-05
| | | | | | Spotted by valgrind. Originally committed as revision 19119 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use skip_bits_long() for large skipsDavid Conrad2009-05-14
| | | | | | This fixes ogg/theora on ARM (more generally the A32 bitstream reader) Originally committed as revision 18819 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-13
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* OGG: correct PTS with old theora streamsMåns Rullgård2008-11-06
| | | | Originally committed as revision 15785 to svn://svn.ffmpeg.org/ffmpeg/trunk
* OGG: untypedef demuxer structsMåns Rullgård2008-11-06
| | | | Originally committed as revision 15784 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Cosmetics: indentationDavid Conrad2008-10-01
| | | | Originally committed as revision 15501 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Visible width/height fields were added in Theora 3.2David Conrad2008-10-01
| | | | Originally committed as revision 15500 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add ff_ prefix to ogg_codec_t structsReimar Döffinger2008-08-24
| | | | Originally committed as revision 14951 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make ogg_codec_t descriptions constReimar Döffinger2008-08-24
| | | | Originally committed as revision 14948 to svn://svn.ffmpeg.org/ffmpeg/trunk
* convert every muxer/demuxer to write/read sample_aspect_ratio from/toAurelien Jacobs2008-08-23
| | | | | | the corresponding AVStream instead of AVCodecContext Originally committed as revision 14933 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full path for #includes from another directory.Diego Biurrun2008-05-09
| | | | Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
* set PKT_FLAG_KEY for Theora and OGM streamsMåns Rullgård2007-11-11
| | | | Originally committed as revision 11002 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ogg2.[ch] to oggdec.[ch].Diego Biurrun2007-11-07
| | | | Originally committed as revision 10943 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use AV_RB* macros where appropriate.Ronald S. Bultje2007-07-06
| | | | | | | | patch by Ronald S. Bultje, rsbultje gmail com thread: Re: [FFmpeg-devel] remove int readers date: Sat, 23 Jun 2007 09:32:12 -0400 Originally committed as revision 9499 to svn://svn.ffmpeg.org/ffmpeg/trunk
* use get_bits_long() where neededAurelien Jacobs2007-06-14
| | | | | | patch by Aurelien Jacobs, aurel gnuage org Originally committed as revision 9314 to svn://svn.ffmpeg.org/ffmpeg/trunk
* fix display of theora videos with visible size smaller than encoded sizeAurelien Jacobs2007-05-07
| | | | Originally committed as revision 8928 to svn://svn.ffmpeg.org/ffmpeg/trunk
* fix playback of theora.ogg on mphq patch by (matthieu castet %% castet dat ↵Matthieu Castet2006-07-17
| | | | | | matthieu ot free dat fr %%) Originally committed as revision 5776 to svn://svn.ffmpeg.org/ffmpeg/trunk
* set stream time_base properlyMåns Rullgård2006-05-12
| | | | Originally committed as revision 5367 to svn://svn.ffmpeg.org/ffmpeg/trunk
* support correct ptses on other than version 3.2.0 aswellAlex Beregszaszi2006-02-22
| | | | Originally committed as revision 5047 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: tabs --> spaces, some prettyprintingDiego Biurrun2005-12-22
| | | | Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-17
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* changing AVCodecContext codec -> *codec in AVStream so additions to ↵Michael Niedermayer2005-07-17
| | | | | | AVCodecContext dont randomize AVStream and break binary compatibility Originally committed as revision 4453 to svn://svn.ffmpeg.org/ffmpeg/trunk
* check theora versionMåns Rullgård2005-05-12
| | | | Originally committed as revision 4229 to svn://svn.ffmpeg.org/ffmpeg/trunk
* support theora in ogg, plus required ogg core changesMåns Rullgård2005-05-11
Originally committed as revision 4217 to svn://svn.ffmpeg.org/ffmpeg/trunk