Signed-off-by: Marton Balint <cus@passwd.hu>
#define VFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
#define OFFSET(x) offsetof(LoopContext, x)
+static void check_size(AVFilterContext *ctx)
+{
+ LoopContext *s = ctx->priv;
+
+ if (!s->size)
+ av_log(ctx, AV_LOG_WARNING, "Number of %s to loop is not set!\n",
+ ctx->input_pads[0].type == AVMEDIA_TYPE_VIDEO ? "frames" : "samples");
+}
+
#if CONFIG_ALOOP_FILTER
static int aconfig_input(AVFilterLink *inlink)
if (!s->fifo || !s->left)
return AVERROR(ENOMEM);
+ check_size(ctx);
+
return 0;
}
if (!s->frames)
return AVERROR(ENOMEM);
+ check_size(ctx);
+
return 0;
}