aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-16 00:08:36 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-09 07:13:48 +0100
commit694671bc9af5117bfb6a8bdd19821592f0d9372d (patch)
treea02b52111717cd8be262af89f27fd10566b456e8
parentc0367f78d5a5af4abd5adadef4d44e4913e7dc3c (diff)
downloadffmpeg-694671bc9af5117bfb6a8bdd19821592f0d9372d.tar.gz
avfilter/f_sendcmd: consider it an error if there are no commands
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-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");