summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-05-19 17:31:56 +0000
committerDiego Biurrun <diego@biurrun.de>2009-05-19 17:31:56 +0000
commit6532cd55b15c65c4853c72c28b4c4a4f37426d19 (patch)
tree445d512dcee1100a3ebaab28517e2edf05c188f6
parent4e1424fdc7ab00e6b8f2c954f00a5b56e2e6cf42 (diff)
Move AMR-WB-specific code to the AMR-WB section of the file.
Fixes compilation when AMR-NB #includes are not available on the system. Originally committed as revision 18870 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/libamr.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavcodec/libamr.c b/libavcodec/libamr.c
index 3b103b8579..52c211835a 100644
--- a/libavcodec/libamr.c
+++ b/libavcodec/libamr.c
@@ -57,6 +57,22 @@
#include "avcodec.h"
+static void amr_decode_fix_avctx(AVCodecContext *avctx)
+{
+ const int is_amr_wb = 1 + (avctx->codec_id == CODEC_ID_AMR_WB);
+
+ if (!avctx->sample_rate)
+ avctx->sample_rate = 8000 * is_amr_wb;
+
+ if (!avctx->channels)
+ avctx->channels = 1;
+
+ avctx->frame_size = 160 * is_amr_wb;
+ avctx->sample_fmt = SAMPLE_FMT_S16;
+}
+
+#if CONFIG_LIBAMR_NB
+
#include <amrnb/interf_dec.h>
#include <amrnb/interf_enc.h>
@@ -90,22 +106,6 @@ static int getBitrateMode(int bitrate)
return -1;
}
-static void amr_decode_fix_avctx(AVCodecContext *avctx)
-{
- const int is_amr_wb = 1 + (avctx->codec_id == CODEC_ID_AMR_WB);
-
- if (!avctx->sample_rate)
- avctx->sample_rate = 8000 * is_amr_wb;
-
- if (!avctx->channels)
- avctx->channels = 1;
-
- avctx->frame_size = 160 * is_amr_wb;
- avctx->sample_fmt = SAMPLE_FMT_S16;
-}
-
-#if CONFIG_LIBAMR_NB
-
typedef struct AMRContext {
int frameCount;
void *decState;