aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit '943135621830ac3857d3cf766cfc280a95bb3c13'Michael Niedermayer2013-12-111-12/+2
|\| | | | | | | | | | | | | * commit '943135621830ac3857d3cf766cfc280a95bb3c13': lavc: deprecate avcodec_free_frame() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: deprecate avcodec_free_frame()Anton Khirnov2013-12-111-12/+2
| | | | | | | | av_frame_free() should be used instead.
* | avcodec/utils: Print warning if avcodec_set_dimensions() failedMichael Niedermayer2013-12-111-1/+4
| | | | | | | | | | Fixes CID1135744 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: check that extended data has been set correctly instead of ↵Michael Niedermayer2013-12-101-1/+1
| | | | | | | | | | | | forcing it in avcodec_decode_video2() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: dont depend on the channel layout in unrefcount_frame()Michael Niedermayer2013-12-101-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '37a749012aaacc801fe860428417a6d7b81c103f'Michael Niedermayer2013-12-091-17/+60
|\| | | | | | | | | | | | | | | | | | | * commit '37a749012aaacc801fe860428417a6d7b81c103f': lavc: rework handling of refcounted_frames=0 Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: rework handling of refcounted_frames=0Anton Khirnov2013-12-091-17/+59
| | | | | | | | | | | | | | | | | | Use only proper AVFrame API (no assigning of whole frames, since that hardcodes sizeof(AVFrame) into lavc). Make a copy of the side data, so the caller can use av_frame_unref/free on non-refcounted frames, eliminating the need for avcodec_get_frame_defaults()/avcodec_free_frame().
* | Merge commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8'Michael Niedermayer2013-12-091-4/+2
|\| | | | | | | | | | | | | | | | | | | * commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8': lavc/decode_video(): always unref the frame if there is no output in decode_video Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc/decode_video(): always unref the frame if there is no output in ↵Anton Khirnov2013-12-091-4/+2
| | | | | | | | | | | | | | | | decode_video Not just on failure. This is the same thing that is done in the audio path and should prevent leaks in decoders that allocate a frame, but then end up not writing into it.
* | Merge commit '85f947aefb3dae81f65f518acdffa8e31c679654'Michael Niedermayer2013-12-091-1/+1
|\| | | | | | | | | | | | | * commit '85f947aefb3dae81f65f518acdffa8e31c679654': lavc: remove a pointless check in decode_audio4() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: remove a pointless check in decode_audio4()Anton Khirnov2013-12-091-1/+1
| | | | | | | | av_frame_unref() works fine on unallocated frames.
* | Merge commit 'd4f0f2d1e80b76260eb6b9cdde472ac069dfda56'Michael Niedermayer2013-12-091-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit 'd4f0f2d1e80b76260eb6b9cdde472ac069dfda56': lavc: use buf[0] instead of data[0] as the indicator of an allocated frame Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use buf[0] instead of data[0] as the indicator of an allocated frameAnton Khirnov2013-12-091-1/+1
| | | | | | | | data[0] may be NULL for valid frames with hwaccel pixel formats.
* | Merge commit 'e5419709f50593769037ab77d7102f82d9260784'Michael Niedermayer2013-12-091-13/+0
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e5419709f50593769037ab77d7102f82d9260784': lavc: remove the extended_data workarounds. Conflicts: libavcodec/utils.c One hunk is not merged as not all codecs are updated yet Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: remove the extended_data workarounds.Anton Khirnov2013-12-091-12/+0
| | | | | | | | All decoders should now handle it properly.
* | do O(1) instead of O(n) atomic operations in register functionsMichael Niedermayer2013-12-061-2/+3
| | | | | | | | | | | | about 1ms faster startup time Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: remove unused variableMichael Niedermayer2013-11-211-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: move end zeroing code from av_packet_split_side_data() to ↵Michael Niedermayer2013-11-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | avcodec_decode_subtitle2() This code changes the input packet, which is read only and can in rare circumstances lead to decoder errors. (i run into one of these in the audio decoder, which corrupted the packet during av_find_stream_info() so that actual decoding that single packet failed later) Until a better fix is implemented, this commit limits the problem. A better fix might be to make the subtitle decoders not depend on data[size] = 0 or to copy their input when this is not the case.
* | avcodec/utils: use the unpack_dictionary functionBen Boeckel2013-11-201-21/+4
| | | | | | | | | | Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d'Michael Niedermayer2013-11-171-0/+2
|\| | | | | | | | | | | | | * commit 'b9fb59d2ab05fdfe89d3fb0d7ecbbd91e560f57d': lavc: deprecate avcodec_alloc_frame(). Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: deprecate avcodec_alloc_frame().Anton Khirnov2013-11-161-0/+2
| |
* | Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'Michael Niedermayer2013-11-161-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5b9c3b4505206143d85398c1410949319fa1180f': Replace all instances of avcodec_alloc_frame() with av_frame_alloc(). Conflicts: doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c libavcodec/alacenc.c libavcodec/libopenjpegenc.c libavcodec/libvpxenc.c libavcodec/pcm.c libavcodec/xbmenc.c libavcodec/xwdenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all instances of avcodec_alloc_frame() with av_frame_alloc().Anton Khirnov2013-11-161-1/+1
| |
* | Merge commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4'Michael Niedermayer2013-11-141-20/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cce3e0a49f0dd030262c28d9c53de0bd2fd909c4': Move av_fast_{m,re}alloc from lavc to lavu. Conflicts: libavcodec/avcodec.h libavcodec/utils.c libavutil/mem.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Move av_fast_{m,re}alloc from lavc to lavu.Anton Khirnov2013-11-141-26/+6
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-101-1/+4
|\| | | | | | | | | | | | | | | | | | | * qatar/master: hwaccel: Simplify ff_find_hwaccel Conflicts: libavcodec/mpeg12dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hwaccel: Simplify ff_find_hwaccelLuca Barbato2013-11-101-1/+4
| | | | | | | | It is always called by passing fields from an AVCodecContext.
* | Merge commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9'Michael Niedermayer2013-11-041-13/+13
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9': lavc: move AVCodecContext.pkt to AVCodecInternal Conflicts: libavcodec/internal.h libavcodec/rawdec.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: move AVCodecContext.pkt to AVCodecInternalAnton Khirnov2013-11-041-4/+4
| | | | | | | | It's a private field, not meant to be accessed from outside lavc.
* | Merge commit '38ecc3702dabbea09230f6d6333f59e74f5d1c12'Michael Niedermayer2013-11-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | * 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-041-1/+1
| | | | | | | | | | | | It's a private field, it should not be visible to callers. Deprecate AVCodecContext.thread_opaque
* | lavc: remove dead FF_API_AVCODEC_OPEN APIStefano Sabatini2013-11-031-7/+0
| |
* | Merge commit '064698d381e1e7790f21b0199a8930ea04e2e942'Michael Niedermayer2013-11-011-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '064698d381e1e7790f21b0199a8930ea04e2e942': Add HEVC decoder Conflicts: Changelog libavcodec/Makefile libavcodec/allcodecs.c libavcodec/hevc.c libavcodec/hevc.h libavcodec/hevc_cabac.c libavcodec/hevc_filter.c libavcodec/hevc_mvs.c libavcodec/hevc_parser.c libavcodec/hevc_ps.c libavcodec/hevc_refs.c libavcodec/hevc_sei.c libavcodec/hevcdsp.c libavcodec/hevcdsp_template.c libavcodec/hevcpred.c libavcodec/hevcpred_template.c libavcodec/version.h cosmetics from hevc.h & hevc_ps.c mostly merged, other files left as they where in ffmpeg. Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '0f6c1d6d64c9f6255ea579dace27d0dd695f0213'Michael Niedermayer2013-11-011-6/+10
|\| | | | | | | | | | | | | | | | | | | * commit '0f6c1d6d64c9f6255ea579dace27d0dd695f0213': lavc/utils: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc/utils: stop using deprecated avcodec_set_dimensionsAnton Khirnov2013-10-311-5/+9
| |
* | Merge commit '7644f5a80787c9b608b82873604805d7e38a6a18'Michael Niedermayer2013-11-011-0/+14
|\| | | | | | | | | | | | | | | | | | | * commit '7644f5a80787c9b608b82873604805d7e38a6a18': lavc: replace avcodec_set_dimensions with ff_set_dimensions Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: replace avcodec_set_dimensions with ff_set_dimensionsAnton Khirnov2013-10-311-4/+15
| | | | | | | | | | | | avcodec_set_dimensions() is supposed to be an internal utility function, there is no reason whatsoever for it to be public. Therefore deprecate it.
* | Merge commit 'b9589f5a770ec2357ab7920a5fabe8510b8601f9'Michael Niedermayer2013-10-301-15/+40
|\| | | | | | | | | | | | | | | | | | | * commit 'b9589f5a770ec2357ab7920a5fabe8510b8601f9': lavc: add error checking to apply_param_change. Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: add error checking to apply_param_change.Anton Khirnov2013-10-301-14/+37
| |
* | lavc: add support for CODEC_CAP_DELAY in subtitlesMarton Balint2013-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | This patch adds CODEC_CAP_DELAY support to avcodec_decode_subtitle2. For DVB teletext decoding, a single teletext packet can contain multiple teletext pages. In order to support that, the teletext decoder may buffer some pages. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: use a default lock manager that uses a pthread mutexMichael Niedermayer2013-10-231-1/+56
| | | | | | | | | | | | | | | | That makes avformat & avcodec thread safe without the need to explicitly register a lock manager. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/pthread: add wpp apiMickaël Raulet2013-10-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | cherry picked from commit c7765f3295fe7dc0653161c6a3d3e1778b76ee67 cherry picked from commit 0008c4979fc1d1bc24d4d2c791715f6dd017563c Conflicts: libavcodec/utils.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: make avcodec_decode_subtitle2 more robustMarton Balint2013-10-201-0/+6
| | | | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/utils: add some saftey checks to add_metadata_from_side_data()Michael Niedermayer2013-10-191-1/+8
| | | | | | | | | | | | | | This fixes potential overreads with crafted files. Found-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: Adding seek_preroll to AVCodecContextVignesh Venkatasubramanian2013-10-141-0/+1
| | | | | | | | | | | | | | | | | | seek_preroll field is added to the AVCodecContext struct. It indicates the number of samples to be discarded whenever there is a discontinuity. The minor version is bumped accordingly. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: add av_codec_get_max_lowres()Michael Niedermayer2013-10-031-0/+5
| | | | | | | | | | Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3'Michael Niedermayer2013-09-271-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7e52080cb18332cb1da9fe133498750b6b4b0fb3': pcm: support 24-bit/32-bit little-endian planar Conflicts: doc/general.texi libavcodec/Makefile libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/pcm.c libavcodec/version.h libavformat/nut.c See: 467dfd5dfae7cc435a2b2e7cf012a0de2fea5848 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * pcm: support 24-bit/32-bit little-endian planarPaul B Mahol2013-09-271-0/+2
| | | | | | | | | | | | Used by LXF. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec: fix duplicate includesMichael Niedermayer2013-09-211-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avutil: add av_get_colorspace_name()Michael Niedermayer2013-09-191-15/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>