Browse code

avfilter/avf_showvolume: stop making output fully transparent

Paul B Mahol authored on 2015/08/02 02:36:10
Showing 1 changed files
... ...
@@ -52,7 +52,7 @@ static const AVOption showvolume_options[] = {
52 52
     { "w", "set channel width",  OFFSET(w), AV_OPT_TYPE_INT, {.i64=400}, 40, 1080, FLAGS },
53 53
     { "h", "set channel height", OFFSET(h), AV_OPT_TYPE_INT, {.i64=20}, 1, 100, FLAGS },
54 54
     { "f", "set fade",           OFFSET(f), AV_OPT_TYPE_INT, {.i64=20}, 1, 255, FLAGS },
55
-    { "c", "set volume color expression", OFFSET(color), AV_OPT_TYPE_STRING, {.str="if(gte(VOLUME,-2), if(gte(VOLUME,-1),0xff, 0xffff),0xff00)"}, 0, 0, FLAGS },
55
+    { "c", "set volume color expression", OFFSET(color), AV_OPT_TYPE_STRING, {.str="if(gte(VOLUME,-2), if(gte(VOLUME,-1),0xff0000ff, 0xff00ffff),0xff00ff00)"}, 0, 0, FLAGS },
56 56
     { "t", "display channel names", OFFSET(draw_text), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS },
57 57
     { NULL }
58 58
 };
... ...
@@ -194,7 +194,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
194 194
     for (c = 0; c < inlink->channels; c++) {
195 195
         float *src = (float *)insamples->extended_data[c];
196 196
         float max = 0;
197
-        int color;
197
+        uint32_t color;
198 198
 
199 199
         for (i = 0; i < insamples->nb_samples; i++)
200 200
             max = FFMAX(max, src[i]);