summaryrefslogtreecommitdiff
path: root/libavformat/oggparseflac.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/internal: Don't include avcodec.hAndreas Rheinhardt2022-09-261-0/+1
| | | | | | | | | | | | | | | The general demuxing API uses parsers and decoders. Therefore FFStream contains pointers to AVCodecContexts and AVCodecParserContext and lavf/internal.h includes lavc/avcodec.h. Yet actually only a few files files really use these; and it is best when this number stays small. Therefore this commit uses opaque structs in lavf/internal.h for these contexts and stops including avcodec.h. This also avoids including lavc/codec_desc.h implicitly. All other headers are implicitly included as now (mostly through codec.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt2021-09-171-1/+1
| | | | | | | | | | Do this by allocating AVStream together with the data that is currently in AVStreamInternal; or rather: Put AVStream at the beginning of a new structure called FFStream (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVStreamInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: move AVStream.{parser,need_parsing} to AVStreamInternalJames Almer2021-05-071-1/+1
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/oggparseflac: Replace skip_bits_long() by skip_bits() where possibleMichael Niedermayer2019-12-311-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-121-3/+3
| | | | | | | | | | It is not uncommon to find code where the caller thinks to know better what the return value should be than the callee. E.g. something like "if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit changes several instances of this to instead forward the actual error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggparseflac: Fix memleaks in old_flac_header()Michael Niedermayer2016-05-281-3/+9
| | | | | | Fixes CID1361953 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-11/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7784f47762d59e859b4d0f74b3e021ad9368ee2c'Michael Niedermayer2014-11-061-4/+7
|\ \ | |/ | | | | | | | | | | | | | | | | * 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-4/+7
| | | | | | | | | | | | 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/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * 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/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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.
* | avformat/oggparseflac: check ff_alloc_extradata() return codeMichael Niedermayer2013-10-201-1/+2
| | | | | | | | | | Fixes CID1108573 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-4/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/oggparseflac: fix handling of old flac in oggMichael Niedermayer2013-10-071-1/+22
| | | | | | | | | | | | Improves handling of the file in Ticket1617 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '7751e4693dd10ec98c20fbd9887233b575034272'Michael Niedermayer2012-09-251-2/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7751e4693dd10ec98c20fbd9887233b575034272': ogg: check that the expected number of headers had been parsed libx264: change default to closed gop to match x264cli Use avcodec_free_frame() to free AVFrames. lavf: use a malloced AVFrame in try_decode_frame(). lavc: add avcodec_free_frame(). lavc: ensure extended_data is set properly on decoding lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults() lavc: use av_mallocz to allocate AVFrames. lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults Conflicts: doc/APIchanges doc/examples/decoding_encoding.c libavcodec/utils.c libavcodec/version.h libavfilter/src_movie.c libavformat/oggdec.c libavformat/oggdec.h libavformat/oggparsetheora.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: check that the expected number of headers had been parsedLuca Barbato2012-09-241-2/+4
| | | | | | | | Not having the header for a codec is a tell-tale of a broken file.
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-291-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asf: only set index_read if the index contained entries. cabac: add overread protection to BRANCHLESS_GET_CABAC(). cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). h264: add overread protection to get_cabac_bypass_sign_x86(). h264: reindent get_cabac_bypass_sign_x86(). h264: use struct offsets in get_cabac_bypass_sign_x86(). h264: fix overreads in cabac reader. wmall: fix seeking. lagarith: fix buffer overreads. dvdec: drop unnecessary dv_tablegen.h #include build: fix doc generation errors in parallel builds Replace memset(0) by zero initializations. faandct: Remove FAAN_POSTSCALE define and related code. dvenc: print allowed profiles if the video doesn't conform to any of them. avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size. FATE: add a test for vp8 with changing frame size. fate: add kgv1 fate test. oggdec: calculate correct timestamps in Ogg/FLAC Conflicts: libavcodec/4xm.c libavcodec/cook.c libavcodec/dvdata.c libavcodec/dvdsubdec.c libavcodec/lagarith.c libavcodec/lagarithrac.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggdec: calculate correct timestamps in Ogg/FLACJustin Ruggles2012-03-271-0/+1
| | | | | | | | | | We need to parse the individual packet durations when there is more than one packet in a page.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-011-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtpdec: Templatize the code for different g726 bitrate variants rv40: move loop filter to rv34dsp context lavf: make av_set_pts_info private. rtpdec: Add support for G726 audio rtpdec: Add an init function that can do custom codec context initialization avconv: make copy_tb on by default. matroskadec: don't set codec timebase. rmdec: don't set codec timebase. avconv: compute next_pts from input packet duration when possible. lavf: estimate frame duration from r_frame_rate. avconv: update InputStream.pts in the streamcopy case. Conflicts: avconv.c libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/fbdev.c libavdevice/libdc1394.c libavdevice/oss_audio.c libavdevice/v4l.c libavdevice/v4l2.c libavdevice/vfwcap.c libavdevice/x11grab.c libavformat/au.c libavformat/eacdata.c libavformat/flvdec.c libavformat/mpegts.c libavformat/mxfenc.c libavformat/rtpdec_g726.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-1/+2
| | | | | | | | It's supposed to be called only from (de)muxers.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-211-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (47 commits) lavc: hide private symbols. lavc: deprecate img_get_alpha_info(). lavc: use avpriv_ prefix for ff_toupper4. lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits. lavc: use avpriv_ prefix for ff_ac3_parse_header. lavc: use avpriv_ prefix for ff_frame_rate_tab. lavc: rename ff_find_start_code to avpriv_mpv_find_start_code lavc: use avpriv_ prefix for ff_split_xiph_headers. lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header. lavc: use avpriv_ prefix for some dv symbols used in lavf. lavc: use avpriv_ prefix for some flac symbols used in lavf. lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf. lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf. lavc: use avpriv_ prefix for ff_aac_parse_header(). lavf: hide private symbols. lavf: use avpriv_ prefix for some dv functions. lavf: use avpriv_ prefix for ff_new_chapter(). avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2() avcodec: clarify documentation of CODEC_CAP_DELAY ... Conflicts: configure doc/general.texi libavcodec/Makefile libavcodec/aacdec.c libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/dv.c libavcodec/dvdata.c libavcodec/dvdata.h libavcodec/libspeexenc.c libavcodec/mpegvideo.c libavcodec/version.h libavformat/avidec.c libavformat/dv.c libavformat/dv.h libavformat/flvenc.c libavformat/mov.c libavformat/mp3enc.c libavformat/oggparsespeex.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use avpriv_ prefix for some flac symbols used in lavf.Anton Khirnov2011-10-201-1/+1
| | | | | | | | | | Specifically, ff_flac_parse_streaminfo, ff_flac_is_extradata_valid and ff_flac_parse_block_header
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Always use av_set_pts_info to set the stream time base.Reimar Döffinger2011-02-061-2/+1
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Always use av_set_pts_info to set the stream time base.Reimar Döffinger2011-02-051-2/+1
|/
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-301-2/+2
| | | | | | 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-121-1/+1
| | | | Originally committed as revision 22473 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add ff_ prefix to vorbis_commentDavid Conrad2010-03-121-1/+1
| | | | Originally committed as revision 22472 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-131-1/+1
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* use function and definitions from libavcodec/flac.h in oggparseflac.cJustin Ruggles2009-01-251-9/+8
| | | | Originally committed as revision 16767 to svn://svn.ffmpeg.org/ffmpeg/trunk
* oggflac: fix bitstream reader usageMåns Rullgård2008-12-141-5/+5
| | | | Originally committed as revision 16129 to svn://svn.ffmpeg.org/ffmpeg/trunk
* OGG: untypedef demuxer structsMåns Rullgård2008-11-061-4/+4
| | | | Originally committed as revision 15784 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add ff_ prefix to ogg_codec_t structsReimar Döffinger2008-08-241-2/+2
| | | | Originally committed as revision 14951 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make ogg_codec_t descriptions constReimar Döffinger2008-08-241-2/+2
| | | | Originally committed as revision 14948 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full path for #includes from another directory.Diego Biurrun2008-05-091-1/+1
| | | | Originally committed as revision 13098 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename ogg2.[ch] to oggdec.[ch].Diego Biurrun2007-11-071-1/+1
| | | | Originally committed as revision 10943 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add support for old flac in oggMichael Niedermayer2007-08-121-0/+16
| | | | | | | fixes samples.mplayerhq.hu/flac/Yesterday.ogg closes issue73 Originally committed as revision 10088 to svn://svn.ffmpeg.org/ffmpeg/trunk
* use get_bits_long() where neededAurelien Jacobs2007-06-141-1/+1
| | | | | | patch by Aurelien Jacobs, aurel gnuage org Originally committed as revision 9314 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change license headers to say 'FFmpeg' instead of 'this program/this library'Diego Biurrun2006-10-071-4/+6
| | | | | | and fix GPL/LGPL version mismatches. Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
* set stream time_base properlyMåns Rullgård2006-05-121-0/+3
| | | | Originally committed as revision 5367 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Update licensing information: The FSF changed postal address.Diego Biurrun2006-01-121-1/+1
| | | | Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-171-3/+3
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* changing AVCodecContext codec -> *codec in AVStream so additions to ↵Michael Niedermayer2005-07-171-7/+7
| | | | | | AVCodecContext dont randomize AVStream and break binary compatibility Originally committed as revision 4453 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flac in ogg supportMåns Rullgård2005-05-111-0/+77
based on patch by Matthieu Castet <castet dot matthieu at free dot fr> Originally committed as revision 4220 to svn://svn.ffmpeg.org/ffmpeg/trunk