summaryrefslogtreecommitdiff
path: root/libavfilter/f_streamselect.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-10-01 18:46:20 +0200
committerPaul B Mahol <onemda@gmail.com>2019-10-01 18:46:20 +0200
commit3bb170e530e3f9885d68e5c684fa82346d7158f4 (patch)
tree854c3a2694caf6cd2c9a870d69bc8530c68e25e3 /libavfilter/f_streamselect.c
parentf66458cfc757f394bf83c2c8532176f73cb30056 (diff)
avfilter/f_streamselect: add check case when nothing is done
Fixes #7955.
Diffstat (limited to 'libavfilter/f_streamselect.c')
-rw-r--r--libavfilter/f_streamselect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c
index 923deb1a85..4b913d37f4 100644
--- a/libavfilter/f_streamselect.c
+++ b/libavfilter/f_streamselect.c
@@ -21,6 +21,7 @@
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
+#include "filters.h"
#include "formats.h"
#include "framesync.h"
#include "internal.h"
@@ -53,7 +54,7 @@ static int process_frame(FFFrameSync *fs)
AVFilterContext *ctx = fs->parent;
StreamSelectContext *s = fs->opaque;
AVFrame **in = s->frames;
- int i, j, ret = 0;
+ int i, j, ret = 0, have_out = 0;
for (i = 0; i < ctx->nb_inputs; i++) {
if ((ret = ff_framesync_get_frame(&s->fs, i, &in[i], 0)) < 0)
@@ -75,12 +76,15 @@ static int process_frame(FFFrameSync *fs)
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, ctx->outputs[i]->time_base);
s->last_pts[j] = in[j]->pts;
ret = ff_filter_frame(ctx->outputs[i], out);
+ have_out = 1;
if (ret < 0)
return ret;
}
}
}
+ if (!have_out)
+ ff_filter_set_ready(ctx, 100);
return ret;
}