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