Revision 7dbbf6a1 ffplay.c

View differences:

ffplay.c
168 168
    int last_i_start;
169 169
    RDFTContext *rdft;
170 170
    int rdft_bits;
171
    FFTSample *rdft_data;
171 172
    int xpos;
172 173

  
173 174
    SDL_Thread *subtitle_tid;
......
917 918
        nb_display_channels= FFMIN(nb_display_channels, 2);
918 919
        if(rdft_bits != s->rdft_bits){
919 920
            av_rdft_end(s->rdft);
921
            av_free(s->rdft_data);
920 922
            s->rdft = av_rdft_init(rdft_bits, DFT_R2C);
921 923
            s->rdft_bits= rdft_bits;
924
            s->rdft_data= av_malloc(4*nb_freq*sizeof(*s->rdft_data));
922 925
        }
923 926
        {
924
            FFTSample data[2][2*nb_freq];
927
            FFTSample *data[2];
925 928
            for(ch = 0;ch < nb_display_channels; ch++) {
929
                data[ch] = s->rdft_data + 2*nb_freq*ch;
926 930
                i = i_start + ch;
927 931
                for(x = 0; x < 2*nb_freq; x++) {
928 932
                    double w= (x-nb_freq)*(1.0/nb_freq);

Also available in: Unified diff