mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
lavfi: add ff_inoutlink_check_flow()
This commit is contained in:
parent
12139d1103
commit
531d09fb2d
2 changed files with 16 additions and 0 deletions
|
|
@ -1559,6 +1559,14 @@ int ff_outlink_get_status(AVFilterLink *link)
|
|||
return link->status_in;
|
||||
}
|
||||
|
||||
int ff_inoutlink_check_flow(AVFilterLink *inlink, AVFilterLink *outlink)
|
||||
{
|
||||
return ff_outlink_frame_wanted(outlink) ||
|
||||
ff_inlink_check_available_frame(inlink) ||
|
||||
inlink->status_out;
|
||||
}
|
||||
|
||||
|
||||
const AVClass *avfilter_get_class(void)
|
||||
{
|
||||
return &avfilter_class;
|
||||
|
|
|
|||
|
|
@ -258,4 +258,12 @@ static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Check for flow control between input and output.
|
||||
* This is necessary for filters that may produce several output frames for
|
||||
* a single input event, otherwise they may produce them all at once,
|
||||
* causing excessive memory consumption.
|
||||
*/
|
||||
int ff_inoutlink_check_flow(AVFilterLink *inlink, AVFilterLink *outlink);
|
||||
|
||||
#endif /* AVFILTER_FILTERS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue