Revision 00f72577 ffplay.c

View differences:

ffplay.c
943 943
            for(y=0; y<s->height; y++){
944 944
                double w= 1/sqrt(nb_freq);
945 945
                int a= sqrt(w*sqrt(data[0][2*y+0]*data[0][2*y+0] + data[0][2*y+1]*data[0][2*y+1]));
946
                int b= sqrt(w*sqrt(data[1][2*y+0]*data[1][2*y+0] + data[1][2*y+1]*data[1][2*y+1]));
946
                int b= (nb_display_channels == 2 ) ? sqrt(w*sqrt(data[1][2*y+0]*data[1][2*y+0]
947
                       + data[1][2*y+1]*data[1][2*y+1])) : a;
947 948
                a= FFMIN(a,255);
948 949
                b= FFMIN(b,255);
949 950
                fgcolor = SDL_MapRGB(screen->format, a, b, (a+b)/2);

Also available in: Unified diff