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
2021-09-17avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt
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>
2021-05-07avformat: move AVStream.{parser,need_parsing} to AVStreamInternalJames Almer
Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-31avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.Dale Curtis
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-29Use av_sat_sub64() when updating pts by duration.Dale Curtis
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31avformat/oggparsetheora: Replace get_bits_long() by get_bits() where possibleMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-10avformat/oggparsetheora: Do not adjust AV_NOPTS_VALUEMichael Niedermayer
Fixes: Chromium bug 795653 Fixes: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long' Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> 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-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.
2016-01-02oggparsedaala: reject too large gpshiftAndreas Cadhalpun
Also use a unsigned constant for the shift calculation, as 1 << 31 is undefined for int32_t. This is also fixed oggparsetheora. This fixes ubsan runtime error: shift exponent is too large for 32-bit type 'int' Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-04avformat/oggparsetheora: Check duration to be not AV_NOPTS_VALUE (and ↵Michael Niedermayer
positive) before use Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_7322_4fad88a38dc8952dc20dcb60c1895758.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind 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>
2014-08-14Merge commit 'db68ef898a3802e51b6f41fd600d0d46d058e3f8'Michael Niedermayer
* commit 'db68ef898a3802e51b6f41fd600d0d46d058e3f8': ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes. Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.Andrew Stone
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>
2014-05-28Merge commit '23f741f79327e31be7b2a75ebb2e02111e06e52f'Michael Niedermayer
* commit '23f741f79327e31be7b2a75ebb2e02111e06e52f': matroskadec: parse the channel layout mask for FLAC Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28matroskadec: parse the channel layout mask for FLACAnton Khirnov
It is commonly stored in a vorbiscomment block in codec private data.
2013-12-15avformat/oggparsetheora: zero extradata padding areaMichael Niedermayer
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f66fa0ac09d_9197_theora_a4_v6_k250_s0.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01Merge commit 'ce6949d3a0607eb318dc2872553110df934e9720'Michael Niedermayer
* commit 'ce6949d3a0607eb318dc2872553110df934e9720': oggparsetheora: stop using deprecated avcodec_set_dimensions Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-31oggparsetheora: stop using deprecated avcodec_set_dimensionsAnton Khirnov
2013-10-30Merge remote-tracking branch 'qatar/master'Michael Niedermayer
* qatar/master: oggparsetheora: check av_mallocz result Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-30Merge commit '5e5fb21877d8da7b3b8a27bb4d6a070d210c152d'Michael Niedermayer
* commit '5e5fb21877d8da7b3b8a27bb4d6a070d210c152d': oggparsetheora: return meaningful error codes Conflicts: libavformat/oggparsetheora.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-30Merge commit 'd4c12b8be4bdd2ffddb3bd5e11773de4c4c46f68'Michael Niedermayer
* commit 'd4c12b8be4bdd2ffddb3bd5e11773de4c4c46f68': oggparsetheora: K&R cosmetics, reformat Conflicts: libavformat/oggparsetheora.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-30oggparsetheora: check av_mallocz resultAnton Khirnov
2013-10-30oggparsetheora: return meaningful error codesAnton Khirnov
2013-10-30oggparsetheora: K&R cosmetics, reformatAnton Khirnov
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>
2013-09-27Merge commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9'Michael Niedermayer
* commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9': lavf: Reset the entry count and allocation size variables on av_reallocp failures Conflicts: libavformat/avienc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27lavf: Reset the entry count and allocation size variables on av_reallocp ↵Martin Storsjö
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>
2013-09-19Merge commit '5626f994f273af80fb100d4743b963304de9e05c'Michael Niedermayer
* commit '5626f994f273af80fb100d4743b963304de9e05c': avformat: Use av_reallocp() where suitable Conflicts: libavformat/avidec.c libavformat/avienc.c libavformat/aviobuf.c libavformat/oggparsevorbis.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18avformat: Use av_reallocp() where suitableAlexandra Khirnova
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-14oggparsetheora: fix comment header parsingGiorgio Vazzana
Pass the correct header size to ff_vorbis_comment() Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-05oggparsetheora: fix comment header parsingGiorgio Vazzana
Pass the correct header size to ff_vorbis_comment() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25oggparsetheora: print error when failing on unknown headerMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25Merge remote-tracking branch 'qatar/master'Michael Niedermayer
* qatar/master: pthread: make sure AVFrame.extended_data is set properly. libfdk-aac: reindent after last commit libfdk-aac: Limit to supported sample rates. cbrt_tablegen: Include libm.h oggparsetheora: make it more robust ogg: prevent NULL pointer deference in theora gptopts Conflicts: libavformat/oggparsetheora.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25Merge commit '7751e4693dd10ec98c20fbd9887233b575034272'Michael Niedermayer
* 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>
2012-09-25ogg: check that the expected number of headers had been parsedLuca Barbato
Not having the header for a codec is a tell-tale of a broken file.
2012-09-25oggparsetheora: make it more robustLuca Barbato
2012-09-25ogg: prevent NULL pointer deference in theora gptoptsMichael Niedermayer
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>
2012-08-13oggparsetheora: fix metadata parsingMichael Niedermayer
Fixes Ticket1508 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-08Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer
* 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>
2012-08-07Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov
2012-05-05oggtheora: Port changes from oggvorbis timestamp handling.Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-04oggtheora: Fix initial ptsMichael Niedermayer
code based on the solution in vorbis Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23vorbisdemux: Check private context in theoras gtopts.Michael Niedermayer
This prevents a null ptr dereference. It could be checked differently but this way it should be possible to return some data. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-02ogg: don't set codec timebaseAnton Khirnov
Demuxers are not supposed to set it.
2011-11-30lavf: make av_set_pts_info private.Anton Khirnov
It's supposed to be called only from (de)muxers.
2011-02-07Always use av_set_pts_info to set the stream time base.Reimar Döffinger
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2010-03-31Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.Jean-Daniel Dupas
Patch by Jean-Daniel Dupas, devlists shadowlab org Originally committed as revision 22744 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini
is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-12oggdec: Metadata is per-stream; don't merge multiple streams' togetherDavid Conrad
Originally committed as revision 22473 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-12Add ff_ prefix to vorbis_commentDavid Conrad
Originally committed as revision 22472 to svn://svn.ffmpeg.org/ffmpeg/trunk