summaryrefslogtreecommitdiff
path: root/libavformat/oggparseopus.c
Commit message (Collapse)AuthorAge
* avformat/oggparseopus: Free opus extradata before reallocating.Dale Curtis2017-11-29
| | | | | | | | Otherwise ff_alloc_extradata() just leaks any existing allocated memory. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggparseopus: Fix Undefined behavior in oggparseopus.c and ↵Thomas Guilbert2016-05-29
| | | | | | | | | libavformat/utils.c Fixes: usan_granule_overflow constant type fix by commiter Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggparseopus: Check that granule pos is within the supported rangeMichael Niedermayer2016-05-11
| | | | | | | | | | | Larger values would imply file durations of astronomic proportions and cause overflows Fixes integer overflow Fixes: usan_int64_overflow Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* 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.
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | 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>
* | 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.
* | lavf/oggparseopus: Setting seek_preroll in AVCodecContextVignesh Venkatasubramanian2014-02-05
| | | | | | | | | | | | | | | | | | Setting seek_preroll value in AVCodecContext for Opus streams embedded in ogg container. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggparseopus: fix segmented timestampsMark Harris2014-01-04
| | | | | | | | | | | | | | | | | | | | | | | | Fix timestamp calculation for code 3 Ogg Opus packets with less than 2 bytes in the last segment (e.g. packet length 255 or 256). A sample that would seek incorrectly in ffplay can be created with: ffmpeg -i in.wav -b:a 34k -vbr off -frame_duration 60 out.opus and libopus 1.1 Also do not read past the end of the buffer when a packet has length 0. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggparseopus: Check opus_duration() return valueJames Almer2013-12-12
| | | | | | | | | | | | | | | | | | | | Regression since 39d11d599cd292485fe991cd22e10d7a1738b3bc os->pduration would be wrongly assigned a negative value on invalid packets instead of aborting. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggparseopus: calculate pts/dts for initial packets after seekingMichael Niedermayer2013-12-11
| | | | | | | | | | | | based on code from oggparsevorbis Fixes Ticket3124 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggparseopus: factor opus_duration() outMichael Niedermayer2013-12-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Exporting opus pre_skip in AVCodecContextVignesh Venkatasubramanian2013-11-25
| | | | | | | | | | | | | | | | | | Opus Pre Skip is exported in AVCodecContext->delay similar to how it is done for matroska. Doing the same for ogg too. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | oggparseopus: use ff_alloc_extradata()James Almer2013-10-14
| | | | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggparseopus: fix nb_headersMichael Niedermayer2013-10-13
| | | | | | | | | | | | | | | | Line comes from ecab1c77410f023b437c6ed3a3281be8f039e574 and was not merged previously Thanks-to: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ecab1c77410f023b437c6ed3a3281be8f039e574'Michael Niedermayer2013-10-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ecab1c77410f023b437c6ed3a3281be8f039e574': oggdec: add support for Opus in Ogg demuxing Conflicts: Changelog libavformat/oggparseopus.c libavformat/version.h See: e62fd6619f7aa91956a1b4ccfa7b0b8d7bc4ba90 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggdec: add support for Opus in Ogg demuxingNicolas George2013-10-12
|
* lavf/oggopus: Fixing a log messageVignesh Venkatasubramanian2013-09-16
| | | | | | | | | Re-wording a log message that's no longer true and changing its severity level to debug. Signed-off by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavf/ogg: Support for end trimming OpusVignesh Venkatasubramanian2013-09-16
| | | | | | | | 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 '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* oggdec: add support for Opus codec.Nicolas George2012-07-20
This patch also introduces CODEC_ID_OPUS.