Unified · Split
| @@ -878,18 +878,16 @@ static int parse_cinespace(AVFilterContext *ctx, FILE *f) · 877 unmodified lines | |||
| 878 | 878 | ||
| 879 | prelut_sizes[i] = npoints; | 879 | prelut_sizes[i] = npoints; |
| 880 | in_min[i] = FLT_MAX; | 880 | in_min[i] = FLT_MAX; |
| 881 | in_max[i] = FLT_MIN; | 881 | in_max[i] = -FLT_MAX; |
| 882 | out_min[i] = FLT_MAX; | 882 | out_min[i] = FLT_MAX; |
| 883 | out_max[i] = FLT_MIN; | 883 | out_max[i] = -FLT_MAX; |
| 884 | |||
| 885 | last = FLT_MIN; | ||
| 886 | 884 | ||
| 887 | for (int j = 0; j < npoints; j++) { | 885 | for (int j = 0; j < npoints; j++) { |
| 888 | NEXT_FLOAT_OR_GOTO(v, end) | 886 | NEXT_FLOAT_OR_GOTO(v, end) |
| 889 | in_min[i] = FFMIN(in_min[i], v); | 887 | in_min[i] = FFMIN(in_min[i], v); |
| 890 | in_max[i] = FFMAX(in_max[i], v); | 888 | in_max[i] = FFMAX(in_max[i], v); |
| 891 | in_prelut[i][j] = v; | 889 | in_prelut[i][j] = v; |
| 892 | if (v < last) { | 890 | if (j > 0 && v < last) { |
| 893 | av_log(ctx, AV_LOG_ERROR, "Invalid file, non increasing prelut.\n"); | 891 | av_log(ctx, AV_LOG_ERROR, "Invalid file, non increasing prelut.\n"); |
| 894 | ret = AVERROR(ENOMEM); | 892 | ret = AVERROR(ENOMEM); |
| 895 | goto end; | 893 | goto end; |