]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Move AMR-WB-specific code to the AMR-WB section of the file.
authordiego <diego@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 19 May 2009 17:31:56 +0000 (17:31 +0000)
committerdiego <diego@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 19 May 2009 17:31:56 +0000 (17:31 +0000)
Fixes compilation when AMR-NB #includes are not available on the system.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18870 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/libamr.c

index 3b103b85793acb2944212b2af878fee8ca10d29e..52c211835ac615670eb48c31ee63c0dec6b95593 100644 (file)
 
 #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;