mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
avfilter: factorize requesting an input frame from multi output filters
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -696,6 +696,21 @@ static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Forward the frame_wanted_out flag from any of the output links to an input link.
|
||||
* 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; \
|
||||
if (ff_outlink_frame_wanted(filter->outputs[i])) { \
|
||||
ff_inlink_request_frame(inlink); \
|
||||
return 0; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Check for flow control between input and output.
|
||||
* This is necessary for filters that may produce several output frames for
|
||||
|
||||
Reference in New Issue
Block a user