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:
parent
c0367f78d5
commit
694671bc9a
@ -403,6 +403,11 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
sendcmd->commands_str, ctx)) < 0)
|
sendcmd->commands_str, ctx)) < 0)
|
||||||
return ret;
|
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);
|
qsort(sendcmd->intervals, sendcmd->nb_intervals, sizeof(Interval), cmp_intervals);
|
||||||
|
|
||||||
av_log(ctx, AV_LOG_DEBUG, "Parsed commands:\n");
|
av_log(ctx, AV_LOG_DEBUG, "Parsed commands:\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user