avfilter/f_sendcmd: consider it an error if there are no commands

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-16 00:08:36 +01:00
parent c0367f78d5
commit 694671bc9a

View File

@ -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");