]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_lut3d: ignore last whitespace when comparing LUT size string
authorPaul B Mahol <onemda@gmail.com>
Sun, 11 Nov 2018 12:36:45 +0000 (13:36 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 11 Nov 2018 12:36:45 +0000 (13:36 +0100)
In some situations it might be tab character and in others normal space.

libavfilter/vf_lut3d.c

index 1beaf5ac4e7091a20eb0e93e90185ecc56acd311..e7601a05acc139c34872fdca1c0aeff85cbaa145 100644 (file)
@@ -384,7 +384,7 @@ static int parse_cube(AVFilterContext *ctx, FILE *f)
     float max[3] = {1.0, 1.0, 1.0};
 
     while (fgets(line, sizeof(line), f)) {
-        if (!strncmp(line, "LUT_3D_SIZE ", 12)) {
+        if (!strncmp(line, "LUT_3D_SIZE", 11)) {
             int i, j, k;
             const int size = strtol(line + 12, NULL, 0);
 
@@ -1027,7 +1027,7 @@ static int parse_cube_1d(AVFilterContext *ctx, FILE *f)
     float max[3] = {1.0, 1.0, 1.0};
 
     while (fgets(line, sizeof(line), f)) {
-        if (!strncmp(line, "LUT_1D_SIZE ", 12)) {
+        if (!strncmp(line, "LUT_1D_SIZE", 11)) {
             const int size = strtol(line + 12, NULL, 0);
             int i;