ffmpeg: fix validity test for file index.

Also fix a typo in the next line.
This commit is contained in:
Nicolas George 2012-04-22 12:11:50 +02:00
parent 605f2b6b00
commit 23a6e4749f

View File

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