summaryrefslogtreecommitdiff
path: root/libavfilter/avfiltergraph.c
Commit message (Collapse)AuthorAge
* lavfi/avfiltergraph: add check before free the formatJun Zhao2019-08-20
| | | | | | | | ff_merge_samplerates will be deallocate a or b in some case, so add a check before free the format. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was ↵Marton Balint2018-04-30
| | | | | | | | | | used Temporarily keep the old method for ffmpeg_filters.c choose_pix_fmt and avfiltergraph.c pick_format() until a paletted pixel format without alpha is introduced. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/avfiltergraph: remove ugly dead codePaul B Mahol2017-12-11
| | | | | | Remnant of old merge. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/avfiltergraph: pass correct audio/video flagsPaul B Mahol2017-11-20
| | | | | | Previously video flags where set for audio option. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi: check links properties after configuring them.Nicolas George2017-11-02
| | | | | | | | For now, check the image size. Inspired by a patch from Paul B Mahol. Invalid sizes would be detected later by allocation failures, detecting problems earlier is cleaner.
* Merge commit '96a47364d1cf346a5d0437e054b1b10d44d8d969'James Almer2017-10-21
|\ | | | | | | | | | | | | * commit '96a47364d1cf346a5d0437e054b1b10d44d8d969': lavfi: Drop deprecated non-const filter retrieval Merged-by: James Almer <jamrial@gmail.com>
| * lavfi: Drop deprecated non-const filter retrievalVittorio Giovara2017-03-23
| | | | | | | | Deprecated in 10/2013.
* | Merge commit 'c5c7cfd5e80d4c36568c01cc40abfde341657ad9'James Almer2017-10-21
|\| | | | | | | | | | | | | * commit 'c5c7cfd5e80d4c36568c01cc40abfde341657ad9': lavfi: Drop deprecated functions to open a filter or a filterchain Merged-by: James Almer <jamrial@gmail.com>
| * lavfi: Drop deprecated functions to open a filter or a filterchainVittorio Giovara2017-03-23
| | | | | | | | Deprecated in 03/2013.
| * avfiltergraph: check the query_formats() return valueAnton Khirnov2016-05-23
| |
* | lavfi: print the error message when threading init fails.Nicolas George2017-06-19
| |
* | lavfi/avfiltergraph: only return EOF in avfilter_graph_request_oldest if all ↵Marton Balint2017-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | sinks EOFed Fixes a regression introduced in 32c59a115d3cc757676b5384a5ea44b5a7a7b872, becoming effective in 912969a33e313c57c906e87a7e2367b78a2160f4. Fixes trimmed output of ffmpeg -f lavfi -i "sine=d=0.01" -f lavfi -i "sine=d=1" -filter_complex "[0:a]anull[a1];[1:a]anull[a2]" -map "[a1]" -f null none -map "[a2]" -f framecrc - Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avfilter/avfiltergraph: Check for allocation failure in ↵Michael Niedermayer2017-03-31
| | | | | | | | | | | | | | | | | | avfilter_graph_queue_command() Fixes: CID1396538 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavfi: deprecate AVFilterGraph->resample_lavr_optsRostislav Pehlivanov2017-03-18
| | | | | | | | | | | | | | Not used by anything at all since we don't auto insert lavr filters. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | avfilter/avfiltergraph: Add assert to write down in machine readable form ↵Michael Niedermayer2017-01-21
| | | | | | | | | | | | | | | | what is assumed about sample rates in swap_samplerates_on_filter() Fixes CID1397292 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavfi: do not call ff_filter_frame() with activate.Nicolas George2017-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | avfilter_graph_request_oldest() does work that should be done by either the filter or the application. The principle of this function, calling ff_request_frame() from outside the filter was always shaky. This version is less elegant since it requires making special cases for each filter, but it is more robust since it no longer calls ff_request_frame() directly without notifying the filter. Eventually, avfilter_graph_request_oldest() will be deprecated for a function to just run the graph.
* | lavfi, ffmpeg: simplify filter names.Nicolas George2017-01-12
| | | | | | | | | | | | The names are only used for technical output and debugging. Make them similar to C identifiers for easier quick reading of debug dumps.
* | lavfi: avfilter_graph_request_oldest: request a frame again before returning.Nicolas George2016-12-23
| | | | | | | | | | | | | | | | | | With min_samples, if a frame arrives but is too small, it clears frame_wanted_out. In most cases, the destination filter would be activated again later because of frame_wanted_out on its own outputs, but not sinks. avfilter_graph_request_oldest() is doing the work of the sink itself, and is therefore allowed to use frame_blocked_in.
* | lavfi: make filter_frame non-recursive.Nicolas George2016-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of changes happen at the same time: - Add a framequeue fifo to AVFilterLink. - split AVFilterLink.status into status_in and status_out: requires changes to the few filters and programs that use it directly (f_interleave, split, filtfmts). - Add a field ready to AVFilterContext, marking when the filter is ready and its activation priority. - Add flags to mark blocked links. - Change ff_filter_frame() to enqueue the frame. - Change all filtering functions to update the ready field and the blocked flags. - Update ff_filter_graph_run_once() to use the ready field. - buffersrc: always push the frame immediately.
* | avfiltergraph.c: restore disabling of auto conversionsBurt P2016-08-10
| | | | | | | | | | | | | | | | Restore a check added in 440af105f2306d3c7b3b3f4d7530bab910d49cb9 but lost sometime after. avfilter_graph_set_auto_convert() will have an effect once again. Signed-off-by: Burt P <pburt0@gmail.com>
* | avfilter/avfiltergraph: Clear graph pointers in ff_filter_graph_remove_filter()Michael Niedermayer2016-05-27
| | | | | | | | | | | | | | When a filter is no longer part of a graph, its pointers should be cleared so no stale pointers remain. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavfi: make request_frame() non-recursive.Nicolas George2015-12-22
| | | | | | | | | | | | | | Instead of calling the input filter request_frame() method, ff_request_frame() now marks the link and returns immediately. buffersink is changed to activate the marked filters until a frame is obtained.
* | lavfi: rename link.current_pts to current_pts_us.Nicolas George2015-12-22
| | | | | | | | | | | | | | This field is used for fast comparison between link ages, it is in AV_TIME_BASE units, in other words microseconds, µs =~ us. Renaming it allows a second field in link time base units.
* | avfilter/avfiltergraph: fix -Wunused-result warningsGanesh Ajjanagadde2015-10-16
| | | | | | | | | | | | | | | | | | | | | | | | Commit bf0d2d6030c239f91e0368a20fb2dc0705bfec99 introduced av_warn_unused_result to avfilter/formats, whose associated warnings were mostly fixed in 6aaac24d72a7da631173209841a3944fcb4a3309. This fixes the issues in avfilter/avfiltergraph. Tested with FATE. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | 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>
* | Merge commit 'e65e4cbbda03ca3c9087f069c9867d518415fca1'Hendrik Leppkes2015-09-05
|\| | | | | | | | | | | | | * commit 'e65e4cbbda03ca3c9087f069c9867d518415fca1': lavfi: Drop deprecated *_count suffixed variables Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavfi: Drop deprecated *_count suffixed variablesVittorio Giovara2015-08-28
| | | | | | | | Deprecated in 06/2012.
* | avfilter/avfiltergraph: Implement and use find_best_sample_fmt_of_2()Michael Niedermayer2015-08-16
| | | | | | | | | | | | | | | | Similar to the pixel format code Fixes Ticket3847 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avfilter/avfiltergraph: Rename ff_avfilter_graph_config_pointers to ↵Michael Niedermayer2015-05-18
| | | | | | | | | | | | | | | | graph_config_pointers. The function is static and only used once in the file its defined in. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/avfiltergraph: assert that the heap_bubble index is validMichael Niedermayer2015-02-18
| | | | | | | | | | | | This might help coverity Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter: Properly check for failed format queryDerek Buitenhuis2014-10-02
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | lavfi: check refcount before merging.Nicolas George2014-07-17
| | | | | | | | | | | | | | | | | | | | When merging the formats around the automatically inserted convert filters, the refcount of the format lists can not be 0. Coverity does not detect it, and suspects a memory leak, because if refcount is 0 the newly allocated lists are not stored anywhere. That gives CIDs 1224282, 1224283 and 1224284. Lists with refcount 0 are used in can_merge_formats(), so the asserts can not be moved inside the merge functions.
* | avfilter/avfiltergraph: dont "or" together error codesMichael Niedermayer2014-07-03
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Move av_find_best_pix_fmt_of_2() from avcodec to avutilMichael Niedermayer2014-04-30
| | | | | | | | | | | | | | | | | | This avoids a dependancy of libavfilter on libavcodec See Ticket 3592 Fixes Ticket2784 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter: make avfilter_graph_get_filter use const string nameYu Xiaolei2014-03-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi/avfiltergraph: do not reduce incompatible lists.Nicolas George2013-11-03
| | | | | | | | | | A list of "all channel layouts" but not "all channel counts" can not be reduced to a single unknown channel count.
* | lavfi/avfiltergraph: suggest a solution when format selection fails.Nicolas George2013-11-03
| | | | | | | | | | Format selection can fail if unknown channel layouts are used with filters that do not support it.
* | avfiltergraph: Properly handle memory allocation failureDerek Buitenhuis2013-10-27
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Do not leave positive values undefined when negative are defined as errorMichael Niedermayer2013-10-19
| | | | | | | | | | | | | | | | Define positive return values as non errors and leave further meaning undefined This allows future extensions to use these values Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-09-28
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: allow user-provided execute() callbacks Conflicts: libavfilter/avfilter.h libavfilter/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavfi: allow user-provided execute() callbacksAnton Khirnov2013-09-28
| |
* | Merge commit '77cc958f60f73963be4281d6e82ef81707e40c26'Michael Niedermayer2013-08-05
|\| | | | | | | | | | | | | * commit '77cc958f60f73963be4281d6e82ef81707e40c26': lavfi: add const to the AVFilter parameter of avfilter_graph_create_filter() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavfi: add const to the AVFilter parameter of avfilter_graph_create_filter()Anton Khirnov2013-08-04
| | | | | | | | This function should never modify the filter.
* | Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'Michael Niedermayer2013-08-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
| |
* | avfilter/can_merge_formats: fix memleakMichael Niedermayer2013-07-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/avfiltergraph: fix check using the wrong variablesMichael Niedermayer2013-07-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/avfiltergraph: minor cosmeticMichael Niedermayer2013-07-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter: Dont partially merge listsMichael Niedermayer2013-07-23
| | | | | | | | | | | | | | | | | | | | This prevents the unneeded insertion of multiple aresample filters in some cases The format merging is moved to avoid having to call the channel layout merge twice. The channel layout merge code uses different structures and is not compatible with the added dry run wrappers. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avfilter/REDUCE_FORMATS: fix bug that ended reducing too earlyMichael Niedermayer2013-07-22
| | | | | | | | | | | | | | | | | | | | Prior to this it was possible that format reduction was ended before it fully propagated leading to failure later in picking formats. No testcase with unmodified source exists, the case was reproduced with less aggressive list merging though. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>