summaryrefslogtreecommitdiff
path: root/libavfilter/af_amix.c
Commit message (Collapse)AuthorAge
* avfilter/af_amix: rename sum option to normalizePaul B Mahol2021-02-12
| | | | It makes more sense to still use provided weights.
* avfilter/af_amix: add sum optionPaul B Mahol2021-02-04
|
* avfilter/af_amix: do not leave unset PTS for frames after first stream is overPaul B Mahol2020-09-14
| | | | First stream is used only to get number of samples to put into each output frame.
* avfilter/af_amix: Fix double-free of AVFilterChannelLayouts on errorAndreas Rheinhardt2020-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | The query_formats function of the amix filter tries to allocate a list of channel layouts which are attached to more permanent objects (an AVFilter's links) for storage afterwards on success. If attaching a list to a link succeeds, the link becomes one of the common owners of the list. Yet if a list has been successfully attached to links (or if there were no links to attach it to in which case ff_set_common_channel_layouts() already frees the list) and an error happens lateron, the list was manually freed, which is wrong, because the list has either already been freed or it is owned by its links in which case these links' pointers to their list will become dangling and there will be double-frees/uses-after-free when these links are cleaned up automatically. This commit fixes this by removing the custom freeing code; this is made possible by using the list in ff_set_common_channel_layouts() directly after its allocation (without anything that can fail in between). Notice that ff_set_common_channel_layouts() is buggy itself which can lead to double-frees on error. This is not fixed in this commit. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_amix: Don't needlessly reallocate tableAndreas Rheinhardt2020-08-23
| | | | | | | | | | | Replace using ff_add_format() repeatedly by a single call to ff_make_format_list(). (Right now this also fixes a memleak: If the first ff_add_format() succeeds and a subsequent call fails, the list leaks.) Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_amix: make weights option runtime configuredPaul B Mahol2020-04-29
|
* avfilter/af_amix: unbreak FATE, increase iterator when breaking from loopPaul B Mahol2020-04-14
|
* avfilter/af_amix: use av_strtod() for weightsPaul B Mahol2020-04-14
|
* avfilter/af_amix: change the max range of the number of inputsLimin Wang2020-01-11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/af_amix: fix filtering if specified weights are negativePaul B Mahol2019-10-03
|
* avfilter: forward status back in some filters that missed itPaul B Mahol2018-05-05
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: add weights optionPaul B Mahol2018-04-01
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: make use of av_asprintf()Paul B Mahol2017-11-24
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: do not request samples if inlink reached EOFPaul B Mahol2017-08-27
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: simplify const entries for duration in amix_options[]Paul B Mahol2017-08-26
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: switch to activatePaul B Mahol2017-08-26
| | | | | | Really fixes hangs and infinite loops. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: check ff_insert_inpad() for failurePaul B Mahol2017-08-25
|
* af_amix: Add missing error checkDerek Buitenhuis2017-07-07
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avfilter/af_amix: fix possible hangPaul B Mahol2017-06-18
| | | | | | Fixes #6424. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: add double sample format supportPaul B Mahol2017-04-10
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* libavfilter/af_amix.c Increase sources from 32 to 1024Warblefly2017-04-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_amix: use ff_all_channel_counts() instead of ↵Paul B Mahol2016-09-10
| | | | | | | | ff_all_channel_layouts() Adds support for filtering frames with unknown channel layouts. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: make independent of the channel layoutMichael Niedermayer2016-09-06
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_amix: dont fail if there are no samples in output_frame()Michael Niedermayer2016-06-06
| | | | | | Fixes Ticket5326 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/af_amix: fix memory leakGanesh Ajjanagadde2015-12-09
| | | | | | | | | | | | | | | | | Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and 3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning up usage of the formats API, and in particular fixed possible NULL pointer dereferences. This commit addresses the issue of possible resource leaks when some intermediate call fails. Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation of malloc/realloc failures. Fixes: CID 1250334. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* lavfi/af_amix: mostly fix scheduling.Nicolas George2015-11-07
|
* avfilter/all: propagate errors of functions from avfilter/formatsGanesh Ajjanagadde2015-10-14
| | | | | | | | | | | | | | | | | | 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>
* avfilter: handle error in query_formats() in bunch of filtersPaul B Mahol2015-04-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: Use av_mallocz_array()Michael Niedermayer2015-04-06
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: check av_strdup() return valuePaul B Mahol2015-01-06
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/af_amix: Use avpriv_float_dsp_alloc()Michael Niedermayer2014-11-18
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavfilter/af_amix: avoid derreferencing possible nullReynaldo H. Verdejo Pinochet2014-09-26
| | | | | | | | ff_all_channel_layouts() might return null on alloc failure. Fixes CID1241516 Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
* Drop remaining unneeded != NULLMichael Niedermayer2014-08-15
| | | | | Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/af_amix: Use av_mallocz_array()Michael Niedermayer2014-06-07
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavfi: do not export the filters from shared objectsAnton Khirnov2013-10-28
| |
* | avfilter: various cosmeticsPaul B Mahol2013-09-12
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Reinstate proper FFmpeg license for all files.Thilo Borgmann2013-08-30
| |
* | Merge commit '093804a93cc5da3f95f98265a5df116912443cec'Michael Niedermayer2013-05-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '093804a93cc5da3f95f98265a5df116912443cec': avfilter: Add av_cold attributes to init/uninit functions Conflicts: libavfilter/af_ashowinfo.c libavfilter/af_volume.c libavfilter/src_movie.c libavfilter/vf_lut.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avfilter: Add av_cold attributes to init/uninit functionsDiego Biurrun2013-05-04
| |
* | Merge commit '7cdd737ba81b5c2c9521c4509edf0ac315fabc65'Michael Niedermayer2013-04-12
|\| | | | | | | | | | | | | * commit '7cdd737ba81b5c2c9521c4509edf0ac315fabc65': lavfi: mark filters with dynamic number of inputs or outputs with special flags Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavfi: mark filters with dynamic number of inputs or outputs with special flagsAnton Khirnov2013-04-11
| | | | | | | | | | This will be useful in avtools in the following commits. Any other caller might also want to know this information.
| * lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov2013-04-09
| |
* | lavfi: remove now unused args parameter from AVFilter.initAnton Khirnov2013-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'ac20e3ab8ed497549ee2a62754f01eee5e7a5066'Michael Niedermayer2013-04-11
|\| | | | | | | | | | | | | | | | | | | * commit 'ac20e3ab8ed497549ee2a62754f01eee5e7a5066': af_amix: switch to an AVOptions-based system. Conflicts: libavfilter/af_amix.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * af_amix: switch to an AVOptions-based system.Anton Khirnov2013-04-09
| |
* | Merge commit '7e350379f87e7f74420b4813170fe808e2313911'Michael Niedermayer2013-03-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 759001c534287a96dc96d1e274665feb7059145d 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>
| * lavfi: switch to AVFrame.Anton Khirnov2013-03-08
| | | | | | | | | | Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead.
| * lavfi: merge start_frame/draw_slice/end_frameAnton Khirnov2012-11-28
| | | | | | | | | | Any alleged performance benefits gained from the split are purely mythological and do not justify added code complexity.
* | lavfi: replace filter_samples by filter_frameMichael Niedermayer2012-11-28
| | | | | | | | | | Based on patch by Anton Khirnov Signed-off-by: Michael Niedermayer <michaelni@gmx.at>