# HG changeset patch # User daniel # Date 1266612672 0 # Node ID 359c8ba0698e3da2e1b81a4014ef6a02510f9e55 # Parent 964d01b50f1770f6fc9cf2b13003b8e8a1a1b403 Fix compilation of binkaudio_rdft when dct is disabled diff -r 964d01b50f17 -r 359c8ba0698e binkaudio.c --- a/binkaudio.c Fri Feb 19 20:42:55 2010 +0000 +++ b/binkaudio.c Fri Feb 19 20:51:12 2010 +0000 @@ -122,10 +122,12 @@ for (i = 0; i < s->channels; i++) s->coeffs_ptr[i] = s->coeffs + i * s->frame_len; - if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) + if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) ff_rdft_init(&s->trans.rdft, frame_len_bits, IRIDFT); + else if (CONFIG_BINKAUDIO_DCT_DECODER) + ff_dct_init(&s->trans.dct, frame_len_bits, 0); else - ff_dct_init(&s->trans.dct, frame_len_bits, 0); + return -1; return 0; } @@ -209,9 +211,9 @@ } } - if (use_dct) + if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct) ff_dct_calc (&s->trans.dct, coeffs); - else + else if (CONFIG_BINKAUDIO_RDFT_DECODER) ff_rdft_calc(&s->trans.rdft, coeffs); } @@ -235,9 +237,9 @@ { BinkAudioContext * s = avctx->priv_data; av_freep(&s->bands); - if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) + if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) ff_rdft_end(&s->trans.rdft); - else + else if (CONFIG_BINKAUDIO_DCT_DECODER) ff_dct_end(&s->trans.dct); return 0; }