summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
Commit message (Collapse)AuthorAge
* avcodec/options: add missing FF_API_COPY_CONTEXT checksJames Almer2020-10-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* AVCodecContext: switch to child_class_iterate()Anton Khirnov2020-06-10
|
* lavc: stop using deprecated av_codec_next()Josh de Kock2020-04-20
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* avcodec/options: remove dead test codeJames Almer2019-05-17
| | | | | | It's been unused since 5d48e4eafa6c4559683892b8638d10508125f3cf. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/options: Remove unneeded headerDerek Buitenhuis2018-01-03
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/options: do a more thorough clean up in avcodec_copy_context()James Almer2017-04-30
| | | | | | | | | Free coded_frame, coded_side_data and unref hw_device_ctx to prevent potential leaks. Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options: factorize avcodec_copy_context() cleanup codeJames Almer2017-04-30
| | | | | | Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit 'd59641abfd25a1007bdf4723d952887b1e3619c6'Clément Bœsch2017-03-12
|\ | | | | | | | | | | | | * commit 'd59641abfd25a1007bdf4723d952887b1e3619c6': lavc: initialize AVCodecContext.sw_pix_fmt properly Merged-by: Clément Bœsch <u@pkh.me>
| * lavc: initialize AVCodecContext.sw_pix_fmt properlyAnton Khirnov2016-07-22
| | | | | | | | | | Currently it's memset to 0, which is YUV420P. It should be initialized to none.
* | Merge commit '24b5cff01bbac4e08acfd6d19c499e880988f520'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit '24b5cff01bbac4e08acfd6d19c499e880988f520': lavc: handle hw_frames_ctx where necessary Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: handle hw_frames_ctx where necessaryAndrey Turkin2016-05-26
| | | | | | | | | | | | | | avcodec_copy_context() didn't handle hw_frames_ctx references correctly which could cause crashes. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit '04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f': lavc: deprecate avcodec_get_context_defaults3() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: deprecate avcodec_get_context_defaults3()Anton Khirnov2016-05-23
| | | | | | | | | | | | | | | | | | This function is supposed to "reset" a codec context to a clean state so that it can be opened again. The only reason it exists is to allow using AVStream.codec as a decoding context (after it was already opened/used/closed by avformat_find_stream_info()). Since that behaviour is now deprecated, there is no reason for this function to exist anymore.
* | Merge commit '5f30ac27795f9f98043e8582ccaad8813104adc4'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit '5f30ac27795f9f98043e8582ccaad8813104adc4': lavc: deprecate avcodec_copy_context() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: deprecate avcodec_copy_context()Anton Khirnov2016-05-23
| | | | | | | | | | | | | | | | | | Since AVCodecContext contains a lot of complex state, copying a codec context is not a well-defined operation. The purpose for which it is typically used (which is well-defined) is copying the stream parameters from one codec context to another. That is now possible with through the AVCodecParameters API. Therefore, there is no reason for avcodec_copy_context() to exist.
* | avcodec/options: Make dummy_v?_encoder staticMichael Niedermayer2015-08-30
| | | | | | | | | | | | It does not need to be non static Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/options: Silence deprecated warning about coded_frameMichael Niedermayer2015-08-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/options-test: don't alloc avctx->coded_frameJames Almer2015-07-21
| | | | | | | | | | | | | | | | It's done automatically by avcodec_open2() now. Fixes memleaks in fate-libavcodec-options. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit 'f046c3b5ac36848cce824b008e0347c621523041'Michael Niedermayer2015-07-03
|\| | | | | | | | | | | | | | | * commit 'f046c3b5ac36848cce824b008e0347c621523041': lavc: Move deprecation warning disabling to files including the table lavc: Disable deprectation warnings coming from options table Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Move deprecation warning disabling to files including the tableVittorio Giovara2015-07-03
| | | | | | | | | | | | Unbreak build from 7a5902c556d84a367dd64a003a4e7244fc3a73d1. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | lavc/options: add test for avcodec_copy_contextLukasz Marek2014-12-08
| | | | | | | | | | | | | | This test doesn't cover every possible issue with this function. It covers options management only. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix leaks in avcodec_copy_contextLukasz Marek2014-12-06
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: don't copy priv context when it is not AVOption objectLukasz Marek2014-12-06
| | | | | | | | | | | | This prevents potential crash when opt API is used without a class. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix leaks in avcodec_free_contextLukasz Marek2014-11-26
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix rc_eq leakLukasz Marek2014-11-21
| | | | | | | | rc_eq is an option, so it is copied by av_opt_copy(dest, src); above.
* | avcodec/options: Set AVCodecContext->codec upon initialization.Vadim Kalinsky2014-11-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/options: initialize pkt_timebaseLukasz Marek2014-11-16
| | | | | | | | | | | | It's default in option_table.h is 0, but without this fix it is represented as 0/0. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: set timecode_frame_start to -1 as option defaultLukasz Marek2014-11-16
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix shallow copy contextLukasz Marek2014-11-09
| | | | | | | | | | | | | | avcodec_copy_context leaves shallow copy of string/binary/dict options. Double free/accessing freed memory may occur. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | Merge commit 'a75c2eb25a62105c09b48521aef429dc8a231637'Michael Niedermayer2014-10-18
|\| | | | | | | | | | | | | | | | | | | * commit 'a75c2eb25a62105c09b48521aef429dc8a231637': lavc: make rc_eq into private options of mpegvideo encoders Conflicts: libavcodec/options_table.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: make rc_eq into private options of mpegvideo encodersAnton Khirnov2014-10-18
| |
* | Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41'Michael Niedermayer2014-10-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41': lavc: deprecate the use of AVCodecContext.time_base for decoding Conflicts: libavcodec/avcodec.h libavcodec/h264.c libavcodec/mpegvideo_parser.c libavcodec/utils.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: deprecate the use of AVCodecContext.time_base for decodingAnton Khirnov2014-10-15
| | | | | | | | | | | | | | | | | | | | | | When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding.
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/options: use av_opt_copy() in avcodec_copy_context() to copy priv_dataMichael Niedermayer2014-06-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/options: leave priv_data in avcodec_copy_context() intactMichael Niedermayer2014-05-30
| | | | | | | | | | | | | | previously it was freed but the pointer not cleared Found-by: ruggles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'fd056029f45a9f6d213d9fce8165632042511d4f'Michael Niedermayer2014-05-18
|\| | | | | | | | | | | | | | | | | | | | | * commit 'fd056029f45a9f6d213d9fce8165632042511d4f': lavc: add avcodec_free_context(). Conflicts: doc/APIchanges libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: add avcodec_free_context().Anton Khirnov2014-05-18
| | | | | | | | | | | | | | | | | | | | | | Right now, the caller has to manually manage some allocated AVCodecContext fields, like extradata or subtitle_header. This is fragile and prone to leaks, especially if we want to add more such fields in the future. The only reason for this behaviour is so that the AVStream codec context can be reused for decoding. Such reuse is discouraged anyway, so this commit is the first step to deprecating it.
* | avcodec/options: avcodec_copy_context() Check subtitle_header_size instead ↵Michael Niedermayer2014-05-15
| | | | | | | | | | | | | | | | of setting it The value is already copied in the generic code so it should always match Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3b2fbe67bd63b00331db2a9b213f6d420418a312'Michael Niedermayer2014-05-15
|\| | | | | | | | | | | | | | | | | | | * commit '3b2fbe67bd63b00331db2a9b213f6d420418a312': lavc: properly handle subtitle_header in avcodec_copy_context() Conflicts: libavcodec/options.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: properly handle subtitle_header in avcodec_copy_context()Anton Khirnov2014-05-15
| |
* | Merge commit 'efc7df6c1f11b20a48e60c3f743ce2331b661973'Michael Niedermayer2014-05-15
|\| | | | | | | | | | | | | * commit 'efc7df6c1f11b20a48e60c3f743ce2331b661973': lavc: preserve the original private data in avcodec_copy_context() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: preserve the original private data in avcodec_copy_context()Anton Khirnov2014-05-15
| | | | | | | | | | If a non-NULL codec was passed to avcodec_alloc_context3(), private data will be already allocated in dest.
* | Merge commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12'Michael Niedermayer2013-11-04
|\| | | | | | | | | | | | | | | | | | | | | * commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12': pthread: store thread contexts in AVCodecInternal instead of AVCodecContext Conflicts: libavcodec/internal.h libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * pthread: store thread contexts in AVCodecInternal instead of AVCodecContextAnton Khirnov2013-11-04
| | | | | | | | | | | | It's a private field, it should not be visible to callers. Deprecate AVCodecContext.thread_opaque
* | lavc: remove dead FF_API_ALLOC_CONTEXT APIStefano Sabatini2013-11-03
| |
* | avcodec: free priv_data in avcodec_copy_context()Michael Niedermayer2013-08-13
| | | | | | | | | | | | | | Fixes memleak Fixes Ticket2216 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>