[FFmpeg-cvslog] avfilter: no need to request more samples if internal frame is available
Paul B Mahol
git at videolan.org
Tue Nov 28 14:15:14 EET 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Nov 28 12:19:08 2023 +0100| [c979ccdfd77e0e8ebaa1604dbc2a11497f24cf97] | committer: Paul B Mahol
avfilter: no need to request more samples if internal frame is available
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c979ccdfd77e0e8ebaa1604dbc2a11497f24cf97
---
libavfilter/af_amultiply.c | 2 +-
libavfilter/af_anlms.c | 2 +-
libavfilter/af_arls.c | 2 +-
libavfilter/af_asdr.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavfilter/af_amultiply.c b/libavfilter/af_amultiply.c
index 0e2bdacd8f..7871487cdd 100644
--- a/libavfilter/af_amultiply.c
+++ b/libavfilter/af_amultiply.c
@@ -110,7 +110,7 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
for (i = 0; i < 2; i++) {
- if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
+ if (s->frames[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
return 0;
diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c
index 9d3c44575b..1516cad0a5 100644
--- a/libavfilter/af_anlms.c
+++ b/libavfilter/af_anlms.c
@@ -162,7 +162,7 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
for (i = 0; i < 2; i++) {
- if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
+ if (s->frame[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
return 0;
diff --git a/libavfilter/af_arls.c b/libavfilter/af_arls.c
index 85e4f92425..301e963d8a 100644
--- a/libavfilter/af_arls.c
+++ b/libavfilter/af_arls.c
@@ -159,7 +159,7 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
for (i = 0; i < 2; i++) {
- if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
+ if (s->frame[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
return 0;
diff --git a/libavfilter/af_asdr.c b/libavfilter/af_asdr.c
index 3942f48053..bb5c30faba 100644
--- a/libavfilter/af_asdr.c
+++ b/libavfilter/af_asdr.c
@@ -186,11 +186,11 @@ static int activate(AVFilterContext *ctx)
if (ff_outlink_frame_wanted(outlink)) {
for (int i = 0; i < 2; i++) {
- if (ff_inlink_queued_samples(ctx->inputs[i]) > 0)
+ if (s->cache[i] || ff_inlink_queued_samples(ctx->inputs[i]) > 0)
continue;
ff_inlink_request_frame(ctx->inputs[i]);
+ return 0;
}
- return 0;
}
return FFERROR_NOT_READY;
More information about the ffmpeg-cvslog
mailing list