[FFmpeg-cvslog] avfilter/f_sendcmd: consider it an error if there are no commands
Michael Niedermayer
git at videolan.org
Mon Feb 9 08:49:10 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 16 00:08:36 2015 +0100| [694671bc9af5117bfb6a8bdd19821592f0d9372d] | committer: Michael Niedermayer
avfilter/f_sendcmd: consider it an error if there are no commands
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=694671bc9af5117bfb6a8bdd19821592f0d9372d
---
libavfilter/f_sendcmd.c | 5 +++++
1 file changed, 5 insertions(+)
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");
More information about the ffmpeg-cvslog
mailing list