diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-04-30 16:33:07 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-05-09 22:21:39 +0200 |
commit | 36c274057a9157c8a6a7335dca8ac82678a25b63 (patch) | |
tree | 5b6a6f5d2db3e5b0659bbbea831b20a4aa67f909 | |
parent | fe100bc556d7b25d301ed65f7ae7a74880770f09 (diff) | |
download | ffmpeg-36c274057a9157c8a6a7335dca8ac82678a25b63.tar.gz |
avfilter/avf_ahistogram: request new frames only when needed
-rw-r--r-- | libavfilter/avf_ahistogram.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c index 4f2059f26e..d14e0bcfac 100644 --- a/libavfilter/avf_ahistogram.c +++ b/libavfilter/avf_ahistogram.c @@ -436,6 +436,11 @@ static int activate(AVFilterContext *ctx) if (ret > 0) return filter_frame(inlink, in); + if (ff_inlink_queued_samples(inlink) >= s->nb_samples) { + ff_filter_set_ready(ctx, 10); + return 0; + } + FF_FILTER_FORWARD_STATUS(inlink, outlink); FF_FILTER_FORWARD_WANTED(outlink, inlink); |