From 23a6e4749fa7134ce411ce186062f70f9d348603 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Sun, 22 Apr 2012 12:11:50 +0200 Subject: [PATCH] ffmpeg: fix validity test for file index. Also fix a typo in the next line. --- ffmpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index f9a9158313..0abed0ce2e 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -862,8 +862,8 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) char *p; int file_idx = strtol(in->name, &p, 0); - if (file_idx < 0 || file_idx > nb_input_files) { - av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtegraph description %s.\n", + if (file_idx < 0 || file_idx >= nb_input_files) { + av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtergraph description %s.\n", file_idx, fg->graph_desc); exit_program(1); }