Commit Graph

125 Commits

Author SHA1 Message Date
Derek Buitenhuis 9a9f3f151f Merge commit 'fb25d99b0a5e21fb8cc184c7a9d3736387778266'
This commit is a no-op.

* commit 'fb25d99b0a5e21fb8cc184c7a9d3736387778266':
  buffersrc: do not discard the error from ff_filter_frame()

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-16 19:48:39 +00:00
Anton Khirnov fb25d99b0a buffersrc: do not discard the error from ff_filter_frame() 2016-02-12 10:18:13 +01:00
Nicolas George 61fb67dcb2 buffersrc: accept the frame rate as argument.
(cherry picked from ffmpeg commit 9ca440679d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
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
Vittorio Giovara dc54c78c4d buffersrc: Improve initialization log message
Add timebase and aspect ratio information.
2015-09-13 17:34:45 +02: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