diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c index e0fb827..bc1d82c 100644 --- a/libavcodec/ra144enc.c +++ b/libavcodec/ra144enc.c @@ -57,6 +57,10 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx) avctx->channels); return -1; } + if (avctx->sample_rate != 8000) { + av_log(avctx, AV_LOG_ERROR, "only 8kHz sample rate is supported\n"); + return -1; + } avctx->frame_size = NBLOCKS * BLOCKSIZE; avctx->delay = avctx->frame_size; avctx->bit_rate = 8000;