vf_lut: fix rgba map regression
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Apr 2012 22:43:53 +0000 (00:43 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Apr 2012 00:02:30 +0000 (02:02 +0200)
Fixes Ticket1184

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_lut.c

index b3816c6..7d8e4b0 100644 (file)
@@ -245,9 +245,11 @@ static int config_props(AVFilterLink *inlink)
     for (comp = 0; comp < desc->nb_components; comp++) {
         double res;
         int tcomp;
-        for (tcomp = 0; lut->rgba_map[tcomp] != comp; tcomp++)
-            ;
-
+        if (lut->is_rgb) {
+            for (tcomp = 0; lut->rgba_map[tcomp] != comp; tcomp++)
+                ;
+        } else
+            tcomp = comp;
         /* create the parsed expression */
         ret = av_expr_parse(&lut->comp_expr[comp], lut->comp_expr_str[comp],
                             var_names, funcs1_names, funcs1, NULL, NULL, 0, ctx);