]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/amrwbdec.c
ff_emulated_edge_mc: fix handling of w/h being 0
[ffmpeg] / libavcodec / amrwbdec.c
index 79a9f14a1c45ebe8e6b0fd3131d41f602800ee17..468ffa0716430aab2427e0af0329192ef2ada9bc 100644 (file)
@@ -24,7 +24,7 @@
  * AMR wideband decoder
  */
 
-#include "libavutil/audioconvert.h"
+#include "libavutil/channel_layout.h"
 #include "libavutil/common.h"
 #include "libavutil/lfg.h"
 
@@ -105,7 +105,8 @@ static av_cold int amrwb_decode_init(AVCodecContext *avctx)
 
     avctx->channels       = 1;
     avctx->channel_layout = AV_CH_LAYOUT_MONO;
-    avctx->sample_rate    = 16000;
+    if (!avctx->sample_rate)
+        avctx->sample_rate = 16000;
     avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
 
     av_lfg_init(&ctx->prng, 1);