changeset 11216:359c8ba0698e libavcodec

Fix compilation of binkaudio_rdft when dct is disabled
author daniel
date Fri, 19 Feb 2010 20:51:12 +0000
parents 964d01b50f17
children 82c2317c05cf
files binkaudio.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }