diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-16 00:08:36 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-09 07:13:48 +0100 |
commit | 694671bc9af5117bfb6a8bdd19821592f0d9372d (patch) | |
tree | a02b52111717cd8be262af89f27fd10566b456e8 /libavfilter/f_sendcmd.c | |
parent | c0367f78d5a5af4abd5adadef4d44e4913e7dc3c (diff) | |
download | ffmpeg-streaming-694671bc9af5117bfb6a8bdd19821592f0d9372d.zip ffmpeg-streaming-694671bc9af5117bfb6a8bdd19821592f0d9372d.tar.gz |
avfilter/f_sendcmd: consider it an error if there are no commands
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/f_sendcmd.c')
-rw-r--r-- | libavfilter/f_sendcmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index 20d9fd1..e1e649c 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"); |