Revision e0ae3591 libavcodec/binkaudio.c

View differences:

libavcodec/binkaudio.c
122 122
    for (i = 0; i < s->channels; i++)
123 123
        s->coeffs_ptr[i] = s->coeffs + i * s->frame_len;
124 124

  
125
    if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
125
    if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
126 126
        ff_rdft_init(&s->trans.rdft, frame_len_bits, IRIDFT);
127
    else
127
    else if (CONFIG_BINKAUDIO_DCT_DECODER)
128 128
        ff_dct_init(&s->trans.dct, frame_len_bits, 0);
129
    else
130
        return -1;
129 131

  
130 132
    return 0;
131 133
}
......
209 211
            }
210 212
        }
211 213

  
212
        if (use_dct)
214
        if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct)
213 215
            ff_dct_calc (&s->trans.dct,  coeffs);
214
        else
216
        else if (CONFIG_BINKAUDIO_RDFT_DECODER)
215 217
            ff_rdft_calc(&s->trans.rdft, coeffs);
216 218
    }
217 219

  
......
235 237
{
236 238
    BinkAudioContext * s = avctx->priv_data;
237 239
    av_freep(&s->bands);
238
    if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
240
    if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
239 241
        ff_rdft_end(&s->trans.rdft);
240
    else
242
    else if (CONFIG_BINKAUDIO_DCT_DECODER)
241 243
        ff_dct_end(&s->trans.dct);
242 244
    return 0;
243 245
}

Also available in: Unified diff