summaryrefslogtreecommitdiff
path: root/libavfilter/f_sendcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/f_sendcmd.c')
-rw-r--r--libavfilter/f_sendcmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c
index 20d9fd1059..e1e649c508 100644
--- a/libavfilter/f_sendcmd.c
+++ b/libavfilter/f_sendcmd.c
@@ -403,6 +403,11 @@ static av_cold int init(AVFilterContext *ctx)
sendcmd->commands_str, ctx)) < 0)
return ret;
+ if (sendcmd->nb_intervals == 0) {
+ av_log(ctx, AV_LOG_ERROR, "No commands\n");
+ return AVERROR(EINVAL);
+ }
+
qsort(sendcmd->intervals, sendcmd->nb_intervals, sizeof(Interval), cmp_intervals);
av_log(ctx, AV_LOG_DEBUG, "Parsed commands:\n");