avfilter/formats: Don't set samplerate or channel count on video links

This currently happens by accident in a few filters that use
ff_set_common_(samplerates|channel_layouts) like afir (if the response
option is set) or agraphmonitor (due to the default code in
avfiltergraph.c). So change those functions to make sure it does no
longer happen.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-08-15 10:15:09 +02:00
parent 79595024ed
commit 4f46c3cf5c
2 changed files with 13 additions and 9 deletions

View File

@ -129,9 +129,9 @@ av_warn_unused_result
AVFilterChannelLayouts *ff_make_format64_list(const int64_t *fmts);
/**
* A helper for query_formats() which sets all links to the same list of channel
* layouts/sample rates. If there are no links hooked to this filter, the list
* is freed.
* Helpers for query_formats() which set all free audio links to the same list
* of channel layouts/sample rates. If there are no links hooked to this list,
* the list is freed.
*/
av_warn_unused_result
int ff_set_common_channel_layouts(AVFilterContext *ctx,