lavf/img2dec: fix out-of-range check in find_image_range()

Take the new parameter start_index into account.
This commit is contained in:
Stefano Sabatini 2012-08-04 17:07:26 +02:00
parent 59e4e40673
commit 07ef7b1a30

View File

@ -135,7 +135,7 @@ static int find_image_range(int *pfirst_index, int *plast_index,
if (avio_check(buf, AVIO_FLAG_READ) > 0) if (avio_check(buf, AVIO_FLAG_READ) > 0)
break; break;
} }
if (first_index == 5) if (first_index == start_index + 5)
goto fail; goto fail;
/* find the last image */ /* find the last image */