Ganesh Ajjanagadde
6aaac24d72
avfilter/all: propagate errors of functions from avfilter/formats
...
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.
All of these were found by using av_warn_unused_result, demonstrating its utility.
Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.
Fixes: CID 1325680, 1325679, 1325678.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-14 10:04:01 -04:00
Hendrik Leppkes
144fb06806
Remove left-over FF_API_AVFILTERBUFFER cruft
2015-09-05 16:27:19 +02:00
Hendrik Leppkes
033764e015
Merge commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0'
...
* commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0':
lavfi: Drop deprecated AVFilterBuffer* code
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-05 16:22:03 +02:00
Vittorio Giovara
f6974fe651
lavfi: Drop deprecated AVFilterBuffer* code
...
Deprecated in 11/2012.
2015-08-28 16:01:16 +02:00
Federico Tomassetti
8eb57dc9d5
buffersrc: Use the correct deallocation function
...
This correction was suggested to me by Michael Niedermayer
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-22 12:26:53 +02:00
Michael Niedermayer
a6df9ce615
avfilter/buffersrc: Use correct, matching deallocation function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 12:33:20 +02:00
Michael Niedermayer
0c9e78caf4
Merge commit '617814b4a717b38add5ccb8dd200dbb655f98f09'
...
* commit '617814b4a717b38add5ccb8dd200dbb655f98f09':
buffersrc: Fix resource leak on error
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 12:15:16 +02:00
Federico Tomassetti
617814b4a7
buffersrc: Fix resource leak on error
...
Bug-Id: CID 1267902
CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-19 23:50:46 +01:00
Michael Niedermayer
8280b7db47
avfilter/buffersrc: add context to av_log() call
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 15:31:05 +01:00
Clément Bœsch
b18d1b094e
avfilter/buffersrc: reindent
2014-06-29 13:26:04 +02:00
Anton Khirnov
b03b2d86aa
buffersrc: avoid using AV_PIX_FMT_NB
...
That hardcodes the number of pixel formats into lavfi and will break
when a shared lavu is updated, adding new pixel formats.
2014-05-26 22:25:41 +02:00
Michael Niedermayer
e951e04a4a
avcodec/buffersrc: use av_mallocz_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-12 12:24:25 +02:00
Lukasz Marek
70b63419ee
lavfi: use av_fifo_freep
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-05-07 23:39:47 +02:00
Michael Niedermayer
74a8dbe1c4
Merge commit '58400ac133bcfb6bf8196b4e5208bc178307739b'
...
* commit '58400ac133bcfb6bf8196b4e5208bc178307739b':
lavfi: name anonymous structs
Conflicts:
libavfilter/buffersink.c
libavfilter/f_select.c
libavfilter/src_movie.c
libavfilter/vf_drawbox.c
libavfilter/vf_drawtext.c
libavfilter/vf_overlay.c
libavfilter/vf_showinfo.c
libavfilter/vf_unsharp.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-19 18:20:17 +02:00
Vittorio Giovara
58400ac133
lavfi: name anonymous structs
2014-04-19 16:20:57 +02:00
Michael Niedermayer
cd259cdaa9
Merge commit '104a97beaffa6348e6fd2c2d07d67c1402322bb3'
...
* commit '104a97beaffa6348e6fd2c2d07d67c1402322bb3':
buffersrc: handle non-refcounted frames in av_buffersrc_add_frame() correctly
Conflicts:
libavfilter/buffersrc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-17 16:38:10 +01:00
Anton Khirnov
104a97beaf
buffersrc: handle non-refcounted frames in av_buffersrc_add_frame() correctly
2014-01-17 10:30:45 +01:00
Stefano Sabatini
cd355d4d59
lavfi/abuffersrc: use AV_OPT_TYPE_SAMPLE_FMT for sample_fmt option
...
Simplify/extend syntax.
2013-12-26 11:35:27 +01:00
Stefano Sabatini
023693d786
lavfi/buffersrc: set min and max values for pix_fmt option
...
Currently the min and max values are not honored, but this will change in
a following patch.
2013-12-16 18:08:17 +01:00
Michael Niedermayer
325f6e0a97
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
lavfi: do not export the filters from shared objects
Conflicts:
libavfilter/af_amix.c
libavfilter/af_anull.c
libavfilter/asrc_anullsrc.c
libavfilter/f_select.c
libavfilter/f_settb.c
libavfilter/split.c
libavfilter/src_movie.c
libavfilter/vf_aspect.c
libavfilter/vf_blackframe.c
libavfilter/vf_colorbalance.c
libavfilter/vf_copy.c
libavfilter/vf_crop.c
libavfilter/vf_cropdetect.c
libavfilter/vf_drawbox.c
libavfilter/vf_format.c
libavfilter/vf_framestep.c
libavfilter/vf_frei0r.c
libavfilter/vf_hflip.c
libavfilter/vf_libopencv.c
libavfilter/vf_lut.c
libavfilter/vf_null.c
libavfilter/vf_overlay.c
libavfilter/vf_scale.c
libavfilter/vf_transpose.c
libavfilter/vf_unsharp.c
libavfilter/vf_vflip.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-29 11:58:11 +01:00
Anton Khirnov
cd43ca0443
lavfi: do not export the filters from shared objects
2013-10-28 15:29:54 +01:00
Michael Niedermayer
20be5e0a0e
Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
...
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
Disable deprecation warnings for cases where a replacement is available
Conflicts:
libavcodec/avpacket.c
libavcodec/pthread.c
libavcodec/utils.c
libavdevice/v4l2.c
libavfilter/avfiltergraph.c
libavfilter/buffersrc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
2013-08-02 19:19:02 +02:00
Hendrik Leppkes
779e6c2b98
lavfi: add attribute_align_arg to all public entry points
...
Previously it was partly only added to central functions called
internally, however if GCC would inline these into the public fuction, the
alignment attribute would not take effect.
Instead, add it to all public entry points to avoid these problems.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-26 19:51:04 +03:00
Hendrik Leppkes
af2a196e66
lavfi: add attribute_align_arg to all public entry points
...
Previously it was partly only added to central functions called
internally, however if GCC would inline these into the public fuction, the
alignment attribute would not take effect.
Instead, add it to all public entry points to avoid these problems.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-26 13:59:30 +02:00
Paul B Mahol
2a1a599bcb
lavfi/buffersrc: remove unused item from BufferSourceContext
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-26 11:43:43 +00:00
Hendrik Leppkes
20c86571cc
lavfi: let gcc realign the stack on public graph driving functions
...
The functions which actually drive the filter graph by pushing
frames through it need to ensure an aligned stack for SIMD functions.
This fixes a crash in YADIF filter when using a mingw build in a MSVC
application.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-04 23:40:13 +03:00
Nicolas George
e3e6aa7afb
lavfi/buffersrc: fix failed requests count.
...
The line was lost during the AVFrame transition.
It causes programs relying on the failed requests count,
especially ffmpeg, to add frames to the wrong input.
Fix trac ticket #2467 .
2013-04-17 11:32:03 +02:00
Anton Khirnov
d69a4177b9
lavfi: remove now unused args parameter from AVFilter.init
...
Conflicts:
libavfilter/avfilter.c
libavfilter/vf_drawtext.c
libavfilter/vf_lut.c
libavfilter/vf_select.c
libavfilter/vf_setpts.c
libavfilter/vsrc_color.c
libavfilter/vsrc_movie.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 11:54:39 +02:00
Michael Niedermayer
c378ba19b5
abuffer: switch to an AVOptions-based shorthand system.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 09:55:01 +02:00
Michael Niedermayer
16e5e13c7e
buffersrc: switch to an AVOptions-based shorthand system.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 09:53:09 +02:00
Nicolas George
0d58bbb28d
lavfi/buffersrc: update for compatibility with the fork.
...
Merge and adapt commit d28cb84
by Anton Khirnov.
2013-04-11 13:09:10 +02:00
Anton Khirnov
c43a7ecad9
lavfi: remove now unused args parameter from AVFilter.init
2013-04-09 19:12:38 +02:00
Anton Khirnov
d28cb84989
buffersrc: switch to an AVOptions-based system.
2013-04-09 18:48:16 +02:00
Michael Niedermayer
df804041bd
Merge commit '6599b087de62a5f9f2a8d61a1952d777d1bff804'
...
* commit '6599b087de62a5f9f2a8d61a1952d777d1bff804':
buffersrc: fix a typo.
lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 11:30:56 +01:00
Anton Khirnov
6599b087de
buffersrc: fix a typo.
...
Vertical shift is log2_chroma_h, not log2_chroma_w.
2013-03-19 11:12:17 +01:00
Anton Khirnov
c977039e58
lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
...
Number of planes is not always equal to the number of components even
for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components
in two planes.
2013-03-19 11:12:17 +01:00
Michael Niedermayer
8152451b56
buffersrc: fix w/h error
...
Found-by: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-18 02:00:57 +01:00
Michael Niedermayer
975fbd43ad
Merge remote-tracking branch 'cigaes/master'
...
* cigaes/master:
lavfi/buffersink: fix header.
lavfi/buffersrc: disable deprecated warnings.
lavfi/buffersrc: check channel count changes.
lavfi/buffersrc: set channel layout if it is known.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 14:30:33 +01:00
Michael Niedermayer
171bd38eda
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-17 12:59:04 +01:00
Nicolas George
a5149607df
lavfi/buffersrc: disable deprecated warnings.
2013-03-17 12:31:24 +01:00
Nicolas George
f29c28a884
lavfi/buffersrc: check channel count changes.
2013-03-17 12:31:24 +01:00
Nicolas George
3cd342636f
lavfi/buffersrc: set channel layout if it is known.
...
Introduced in 01649c7
, lost in the API change.
2013-03-17 11:59:51 +01:00
Anton Khirnov
6552808014
lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
...
It is supposed to be height * linesize, not width * linesize.
Thanks to Hendrik Leppkes for pointing out the bug.
2013-03-17 09:10:04 +01:00
Hendrik Leppkes
d8dccf69ff
lavfi: let gcc realign the stack on public graph driving functions
...
The functions which actually drive the filter graph by pushing
frames through it need to ensure an aligned stack for SIMD functions.
This fixes a crash in YADIF filter when using a mingw build in a MSVC application.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 23:52:35 +01:00
Clément Bœsch
bdbdadbaff
lavfi/buffersrc: raise filter_frame() error.
2013-03-13 19:00:09 +01:00
Nicolas George
b71db3f38e
lavfi/buffersrc: do not dereference NULL frame.
...
frame = NULL is used to indicate EOF.
2013-03-10 17:05:55 +01:00
Nicolas George
b0012de420
lavfi/buffersrc: implement flags.
...
The PUSH flags is necessary for efficient scheduling;
otherwise there is no feedback when adding frames to
closed paths.
The NO_CHECK_FORMAT is a small optimization that does
not cost much to implement.
The KEEP_REF flag maps to the add/write distinction in
the fork's API.
2013-03-10 13:56:17 +01:00
Michael Niedermayer
a05a44e205
Merge commit '7e350379f87e7f74420b4813170fe808e2313911'
...
* commit '7e350379f87e7f74420b4813170fe808e2313911':
lavfi: switch to AVFrame.
Conflicts:
doc/filters.texi
libavfilter/af_ashowinfo.c
libavfilter/audio.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/buffersink.c
libavfilter/buffersrc.c
libavfilter/buffersrc.h
libavfilter/f_select.c
libavfilter/f_setpts.c
libavfilter/fifo.c
libavfilter/split.c
libavfilter/src_movie.c
libavfilter/version.h
libavfilter/vf_aspect.c
libavfilter/vf_bbox.c
libavfilter/vf_blackframe.c
libavfilter/vf_delogo.c
libavfilter/vf_drawbox.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_fieldorder.c
libavfilter/vf_fps.c
libavfilter/vf_frei0r.c
libavfilter/vf_gradfun.c
libavfilter/vf_hqdn3d.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_showinfo.c
libavfilter/vf_transpose.c
libavfilter/vf_vflip.c
libavfilter/vf_yadif.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavfilter/yadif.h
Following are notes about the merge authorship and various technical details.
Michael Niedermayer:
* Main merge operation, notably avfilter.c and video.c
* Switch to AVFrame:
- afade
- anullsrc
- apad
- aresample
- blackframe
- deshake
- idet
- il
- mandelbrot
- mptestsrc
- noise
- setfield
- smartblur
- tinterlace
* various merge changes and fixes in:
- ashowinfo
- blackdetect
- field
- fps
- select
- testsrc
- yadif
Nicolas George:
* Switch to AVFrame:
- make rawdec work with refcounted frames. Adapted from commit
759001c534
by Anton Khirnov.
Also, fix the use of || instead of | in a flags check.
- make buffer sink and src, audio and video work all together
Clément Bœsch:
* Switch to AVFrame:
- aevalsrc
- alphaextract
- blend
- cellauto
- colormatrix
- concat
- earwax
- ebur128
- edgedetect
- geq
- histeq
- histogram
- hue
- kerndeint
- life
- movie
- mp (with the help of Michael)
- overlay
- pad
- pan
- pp
- pp
- removelogo
- sendcmd
- showspectrum
- showwaves
- silencedetect
- stereo3d
- subtitles
- super2xsai
- swapuv
- thumbnail
- tile
Hendrik Leppkes:
* Switch to AVFrame:
- aconvert
- amerge
- asetnsamples
- atempo
- biquads
Matthieu Bouron:
* Switch to AVFrame
- alphamerge
- decimate
- volumedetect
Stefano Sabatini:
* Switch to AVFrame:
- astreamsync
- flite
- framestep
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-10 01:40:35 +01:00
Anton Khirnov
7e350379f8
lavfi: switch to AVFrame.
...
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
2013-03-08 07:37:18 +01:00