[FFmpeg-cvslog] ffmpeg: fix validity test for file index.

Nicolas George git at videolan.org
Sun Apr 22 13:09:18 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sun Apr 22 12:11:50 2012 +0200| [23a6e4749fa7134ce411ce186062f70f9d348603] | committer: Nicolas George

ffmpeg: fix validity test for file index.

Also fix a typo in the next line.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23a6e4749fa7134ce411ce186062f70f9d348603
---

 ffmpeg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index f9a9158..0abed0c 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);
         }



More information about the ffmpeg-cvslog mailing list