aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8'Michael Niedermayer2013-03-141-0/+3
|\| | | | | | | | | | | | | | | * commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8': Add av_log_{ask_for_sample|missing_feature} replacements to libavutil ismindex: Check the return value of allocations Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add av_log_{ask_for_sample|missing_feature} replacements to libavutilDiego Biurrun2013-03-131-0/+3
| | | | | | | | | | This allows reporting missing features and requesting samples from all libraries in a standard way; with a simplified API.
* | avcodec: remove AVCodecContext->metadataHendrik Leppkes2013-03-131-3/+0
| | | | | | | | | | | | | | | | | | This field was only ever set and freed from avcodec, and not otherwise used. However, because frames are refcounted now, avcodec cannot make any assumptions about the lifetime of the frame metadata, which can result in double-frees or leaked memory. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: factorize ff_{thread_,re,}get_buffer error messages.Clément Bœsch2013-03-131-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coccinelle profile used: @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_get_buffer(ctx, f, flags)) < 0) + return r; @@ expression r, ctx, f, loglevel, str; @@ -if ((r = ff_reget_buffer(ctx, f)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_reget_buffer(ctx, f)) < 0) + return r; @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) + return r; ...along with some manual patches for the remaining ones.
* | Merge commit 'a2816230c5c0a8fc72bc0163b7d21a96b194d87a'Michael Niedermayer2013-03-131-1/+2
|\| | | | | | | | | | | | | | | | | | | * commit 'a2816230c5c0a8fc72bc0163b7d21a96b194d87a': avframe: call release_buffer only if it is set Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avframe: call release_buffer only if it is setJanne Grunau2013-03-111-1/+2
| | | | | | | | | | | | AVCodecContext release_buffer() shall be NULL for audio codecs using get_buffer. The backward compatibility code hence have to check before calling it.
* | Merge commit 'e3232f34312f8187094c875445683277ed0c209d'Michael Niedermayer2013-03-131-1/+1
|\| | | | | | | | | | | | | | | * commit 'e3232f34312f8187094c875445683277ed0c209d': svq1: use av_frame_free to free refcounted frame lavc: fix get_buffer() compatibility layer for audio. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: fix get_buffer() compatibility layer for audio.Anton Khirnov2013-03-101-1/+1
| | | | | | | | | | planes - FF_ARRAY_ELEMS would be evaluated as unsigned and underflow instead of being negative as was intended.
| * lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruftAnton Khirnov2013-03-091-36/+0
| |
| * lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruftAnton Khirnov2013-03-091-81/+0
| |
| * lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruftAnton Khirnov2013-03-091-48/+0
| |
* | avcodec: assert that old codec ids match newMichael Niedermayer2013-03-131-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | dsputil: make selectable.Ronald S. Bultje2013-03-121-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2240e92f052960693de55cf4924e80426dfaa965'Michael Niedermayer2013-03-121-1/+0
|\| | | | | | | | | | | | | | | | | | | | | * commit '2240e92f052960693de55cf4924e80426dfaa965': atomic: Add include guards to the implementation headers lavc: update the fallback versions of ff_thread_* Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: update the fallback versions of ff_thread_*Anton Khirnov2013-03-081-6/+6
| | | | | | | | | | Fixes build without threads after 759001c534287a96dc96d1e274665feb7059145d.
* | utils: Dont sent fake channel layouts, 0 layout is better when its not knownMichael Niedermayer2013-03-121-2/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2eba9087f3031c6050f8dcd996225490be6c2410'Michael Niedermayer2013-03-121-4/+26
|\| | | | | | | | | | | | | | | | | | | * commit '2eba9087f3031c6050f8dcd996225490be6c2410': lavc: make up a fake frame channel layout when there is no real one. Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: make up a fake frame channel layout when there is no real one.Anton Khirnov2013-03-081-2/+22
| | | | | | | | | | This should ensure that a valid channel layout is always set on a frame, until a better solution is implemented.
* | Merge commit '15ec0450b4ae891f3e6ababa03c777a4443b94ca'Michael Niedermayer2013-03-121-16/+23
|\| | | | | | | | | | | | | | | | | | | * commit '15ec0450b4ae891f3e6ababa03c777a4443b94ca': lavc: allow decoders to override frame parameters. Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: allow decoders to override frame parameters.Anton Khirnov2013-03-081-7/+14
| |
* | update_frame_pool: use channel fieldMichael Niedermayer2013-03-121-1/+1
| | | | | | | | | | | | Fix memory corruption Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '759001c534287a96dc96d1e274665feb7059145d'Michael Niedermayer2013-03-121-225/+400
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '759001c534287a96dc96d1e274665feb7059145d': lavc decoders: work with refcounted frames. Anton Khirnov (1): lavc decoders: work with refcounted frames. Clément Bœsch (47): lavc/ansi: reset file lavc/ansi: re-do refcounted frame changes from Anton fraps: reset file lavc/fraps: switch to refcounted frames gifdec: reset file lavc/gifdec: switch to refcounted frames dsicinav: resolve conflicts smc: resolve conflicts zmbv: resolve conflicts rpza: resolve conflicts vble: resolve conflicts xxan: resolve conflicts targa: resolve conflicts vmnc: resolve conflicts utvideodec: resolve conflicts tscc: resolve conflicts ulti: resolve conflicts ffv1dec: resolve conflicts dnxhddec: resolve conflicts v210dec: resolve conflicts vp3: resolve conflicts vcr1: resolve conflicts v210x: resolve conflicts wavpack: resolve conflicts pngdec: fix compilation roqvideodec: resolve conflicts pictordec: resolve conflicts mdec: resolve conflicts tiertexseqv: resolve conflicts smacker: resolve conflicts vb: resolve conflicts vqavideo: resolve conflicts xl: resolve conflicts tmv: resolve conflicts vmdav: resolve conflicts truemotion1: resolve conflicts truemotion2: resolve conflicts lcldec: fix compilation libcelt_dec: fix compilation qdrw: fix compilation r210dec: fix compilation rl2: fix compilation wnv1: fix compilation yop: fix compilation tiff: resolve conflicts interplayvideo: fix compilation qpeg: resolve conflicts (FIXME/TESTME). Hendrik Leppkes (33): 012v: convert to refcounted frames 8bps: fix compilation 8svx: resolve conflicts 4xm: resolve conflicts aasc: resolve conflicts bfi: fix compilation aura: fix compilation alsdec: resolve conflicts avrndec: convert to refcounted frames avuidec: convert to refcounted frames bintext: convert to refcounted frames cavsdec: resolve conflicts brender_pix: convert to refcounted frames cinepak: resolve conflicts cinepak: avoid using AVFrame struct directly in private context cljr: fix compilation cpia: convert to refcounted frames cscd: resolve conflicts iff: resolve conflicts and do proper conversion to refcounted frames 4xm: fix reference frame handling cyuv: fix compilation dxa: fix compilation eacmv: fix compilation eamad: fix compilation eatgv: fix compilation escape124: remove unused variable. escape130: convert to refcounted frames evrcdec: convert to refcounted frames exr: convert to refcounted frames mvcdec: convert to refcounted frames paf: properly free the frame data on decode close sgirle: convert to refcounted frames lavfi/moviesrc: use refcounted frames Michael Niedermayer (56): Merge commit '759001c534287a96dc96d1e274665feb7059145d' resolve conflicts in headers motion_est: resolve conflict mpeg4videodec: fix conflicts dpcm conflict fix dpx: fix conflicts indeo3: resolve confilcts kmvc: resolve conflicts kmvc: resolve conflicts h264: resolve conflicts utils: resolve conflicts rawdec: resolve conflcits mpegvideo: resolve conflicts svq1enc: resolve conflicts mpegvideo: dont clear data, fix assertion failure on fate vsynth1 with threads pthreads: resolve conflicts frame_thread_encoder: simple compilefix not yet tested snow: update to buffer refs crytsalhd: fix compile dirac: switch to new API sonic: update to new API svq1: resolve conflict, update to new API ffwavesynth: update to new buffer API g729: update to new API indeo5: fix compile j2kdec: update to new buffer API linopencore-amr: fix compile libvorbisdec: update to new API loco: fix compile paf: update to new API proresdec: update to new API vp56: update to new api / resolve conflicts xface: convert to refcounted frames xan: fix compile&fate v408: update to ref counted buffers v308: update to ref counted buffers yuv4dec: update to ref counted buffers y41p: update to ref counted frames xbm: update to refcounted frames targa_y216: update to refcounted buffers qpeg: fix fate/crash cdxl: fix fate tscc: fix reget buffer useage targa_y216dec: fix style msmpeg4: fix fate h264: ref_picture() copy fields that have been lost too update_frame_pool: use channel field h264: Put code that prevents deadlocks back mpegvideo: dont allow last == current wmalossless: fix buffer ref messup ff_alloc_picture: free tables in case of dimension mismatches h264: fix null pointer dereference and assertion failure frame_thread_encoder: update to bufrefs ec: fix used arrays snowdec: fix off by 1 error in dimensions check h264: disallow single unpaired fields as references of frames Paul B Mahol (2): lavc/vima: convert to refcounted frames sanm: convert to refcounted frames Conflicts: libavcodec/4xm.c libavcodec/8bps.c libavcodec/8svx.c libavcodec/aasc.c libavcodec/alsdec.c libavcodec/anm.c libavcodec/ansi.c libavcodec/avs.c libavcodec/bethsoftvideo.c libavcodec/bfi.c libavcodec/c93.c libavcodec/cavsdec.c libavcodec/cdgraphics.c libavcodec/cinepak.c libavcodec/cljr.c libavcodec/cscd.c libavcodec/dnxhddec.c libavcodec/dpcm.c libavcodec/dpx.c libavcodec/dsicinav.c libavcodec/dvdec.c libavcodec/dxa.c libavcodec/eacmv.c libavcodec/eamad.c libavcodec/eatgq.c libavcodec/eatgv.c libavcodec/eatqi.c libavcodec/error_resilience.c libavcodec/escape124.c libavcodec/ffv1.h libavcodec/ffv1dec.c libavcodec/flicvideo.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g723_1.c libavcodec/gifdec.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_direct.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/huffyuvdec.c libavcodec/idcinvideo.c libavcodec/iff.c libavcodec/indeo2.c libavcodec/indeo3.c libavcodec/internal.h libavcodec/interplayvideo.c libavcodec/ivi_common.c libavcodec/jvdec.c libavcodec/kgv1dec.c libavcodec/kmvc.c libavcodec/lagarith.c libavcodec/libopenjpegdec.c libavcodec/mdec.c libavcodec/mimic.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mmvideo.c libavcodec/motion_est.c libavcodec/motionpixels.c libavcodec/mpc7.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/msrle.c libavcodec/msvideo1.c libavcodec/nuv.c libavcodec/options_table.h libavcodec/pcx.c libavcodec/pictordec.c libavcodec/pngdec.c libavcodec/pnmdec.c libavcodec/pthread.c libavcodec/qpeg.c libavcodec/qtrle.c libavcodec/r210dec.c libavcodec/rawdec.c libavcodec/roqvideodec.c libavcodec/rpza.c libavcodec/smacker.c libavcodec/smc.c libavcodec/svq1dec.c libavcodec/svq1enc.c libavcodec/targa.c libavcodec/tiertexseqv.c libavcodec/tiff.c libavcodec/tmv.c libavcodec/truemotion1.c libavcodec/truemotion2.c libavcodec/tscc.c libavcodec/ulti.c libavcodec/utils.c libavcodec/utvideodec.c libavcodec/v210dec.c libavcodec/v210x.c libavcodec/vb.c libavcodec/vble.c libavcodec/vcr1.c libavcodec/vmdav.c libavcodec/vmnc.c libavcodec/vp3.c libavcodec/vp56.c libavcodec/vp56.h libavcodec/vp6.c libavcodec/vqavideo.c libavcodec/wavpack.c libavcodec/xl.c libavcodec/xxan.c libavcodec/zmbv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc decoders: work with refcounted frames.Anton Khirnov2013-03-081-221/+390
| |
* | lavc/utils: fix typo and reword message in case of too low bitrateStefano Sabatini2013-03-101-1/+1
| |
* | lavc/utils: make sure the iconv descriptor can be opened only once.Clément Bœsch2013-03-081-7/+13
| | | | | | | | | | | | This prevents trying to do some subtitles conversion for each event when the character encoding is not found. It now aborts early instead of flooding stderr.
* | Merge commit '7ecc2d403ce5c7b6ea3b1f368dccefd105209c7e'Michael Niedermayer2013-03-081-13/+1
|\| | | | | | | | | | | | | | | | | | | * commit '7ecc2d403ce5c7b6ea3b1f368dccefd105209c7e': Move AVFrame from lavc to lavu. Conflicts: libavcodec/avcodec.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'Michael Niedermayer2013-03-081-8/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1afddbe59e96af75f1c07605afc95615569f388f': avpacket: use AVBuffer to allow refcounting the packets. Conflicts: libavcodec/avpacket.c libavcodec/utils.c libavdevice/v4l2.c libavformat/avidec.c libavformat/flacdec.c libavformat/id3v2.c libavformat/matroskaenc.c libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-081-6/+12
| | | | | | | | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* | Merge commit 'efa7f4202088c70caba11d7834641bc6eaf41830'Michael Niedermayer2013-03-081-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'efa7f4202088c70caba11d7834641bc6eaf41830': Use the avstring.h locale-independent character type functions avstring: Add locale independent versions of some ctype.h functions Conflicts: avprobe.c doc/APIchanges libavcodec/dvdsubdec.c libavcodec/utils.c libavutil/avstring.c libavutil/avstring.h libavutil/eval.c libavutil/parseutils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-071-4/+4
| | | | | | | | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '70762508ec5919474edb92a5b1f266fd06640f9c'Michael Niedermayer2013-03-071-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '70762508ec5919474edb92a5b1f266fd06640f9c': lavc: Prettify printing of codec tags containing non alphanumeric characters h264: Rename the jpeg_420 pixfmt list to match the common naming structure Conflicts: libavcodec/h264.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Prettify printing of codec tags containing non alphanumeric charactersStefano Sabatini2013-03-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Make av_get_codec_tag_string() show codec tag string characters in a more intelligible ways. For example the ascii char "@" is used as a number, so should be displayed like "[64]" rather than as a printable character. Apart alphanumeric chars, only the characters ' ' and '.' are used literally in codec tags, all the other characters represent numbers. This also avoids relying on locale-dependent character class functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Remove incorrect use of ctype.h functions.Reimar Döffinger2013-03-031-4/+4
| | | | | | | | | | | | | | As far as I can tell the code should not change behaviour depending on locale in any of these places. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avcodec/utils: use AVFrame accessor functionsMichael Niedermayer2013-03-011-26/+28
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: add ff_frame_get_metadatap()Michael Niedermayer2013-03-011-0/+2
| | | | | | | | | | | | This is needed for av_dict_* Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | build: make iconv build configurable.Clément Bœsch2013-02-281-4/+4
| |
* | lavc: check return values consistency when decoding subtitles.Nicolas George2013-02-241-0/+2
| |
* | avcodec_decode_audio4: check got_frame_ptr before handling initial skipMichael Niedermayer2013-02-211-1/+1
| | | | | | | | | | | | | | Fixes out of array accesses Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec_align_dimensions2: Ensure cinepak has large enough buffers.Michael Niedermayer2013-02-201-1/+8
| | | | | | | | | | | | | | This is partly redundant with the following patches, but its safer Found-by: u-bo1b@0w.se Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/utils: reindent in avcodec_decode_subtitle2() after f7963993.Clément Bœsch2013-02-171-10/+10
| |
* | lavc: support subtitles character encoding conversion.Clément Bœsch2013-02-171-3/+103
| |
* | lavc: mark bitmap based subtitles codecs as such.Clément Bœsch2013-02-171-1/+1
| |
* | Merge commit 'd2a25c4032ce6ceabb0f51b5c1e6ca865395a793'Michael Niedermayer2013-02-161-1/+0
|\| | | | | | | | | | | | | | | | | | | * commit 'd2a25c4032ce6ceabb0f51b5c1e6ca865395a793': get_buffer(): do not initialize the data. Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * get_buffer(): do not initialize the data.Anton Khirnov2013-02-151-1/+0
| | | | | | | | | | There may be more decoders that rely on this. Those should be found and fixed.
* | avcodec: add avpriv_color_frame()Michael Niedermayer2013-02-161-0/+22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-02-141-0/+7
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: doc/platform: Fix 10l typo dsputil: Move STRIDE_ALIGN macro to the only place it is used Conflicts: libavcodec/dsputil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Move STRIDE_ALIGN macro to the only place it is usedDiego Biurrun2013-02-131-0/+7
| |
* | lavc: include timebase in avcodec string at debug level.Michael Niedermayer2013-01-241-0/+9
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | EVRC decoderPaul B Mahol2013-01-211-0/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avcodec_decode_audio: do not trust the channel layout, use the channel count.Michael Niedermayer2013-01-181-1/+1
| | | | | | | | | | | | | | Fixes memory corruption Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>