diff options
author | Marton Balint <cus@passwd.hu> | 2025-06-22 12:08:46 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2025-07-03 21:41:53 +0200 |
commit | 29e696c9c010778b4750efb42c3e89544d56ec4e (patch) | |
tree | c31bda248b93170fde075b67caf796fe7dd25763 | |
parent | f3b7aa6c224dc6bbb96a57dceb39b8c4b77c1297 (diff) | |
download | ffmpeg-29e696c9c010778b4750efb42c3e89544d56ec4e.tar.gz |
avfilter/filters: simplify FF_FILTER_FORWARD_WANTED_ANY
The status check is unneeded because an outlink with a nonzero status should
always return 0 for ff_outlink_frame_wanted(). Also use unsigned for index
because nb_outputs is unsigned as well.
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | libavfilter/filters.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/filters.h b/libavfilter/filters.h index 66dc611a98..e3013eda65 100644 --- a/libavfilter/filters.h +++ b/libavfilter/filters.h @@ -701,9 +701,7 @@ static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t * If the flag is set on any of the outputs, this macro will return immediately. */ #define FF_FILTER_FORWARD_WANTED_ANY(filter, inlink) do { \ - for (int i = 0; i < filter->nb_outputs; i++) { \ - if (ff_outlink_get_status(filter->outputs[i])) \ - continue; \ + for (unsigned i = 0; i < filter->nb_outputs; i++) { \ if (ff_outlink_frame_wanted(filter->outputs[i])) { \ ff_inlink_request_frame(inlink); \ return 0; \ |