[FFmpeg-cvslog] g726dec: do not validate sample rate

Justin Ruggles git at videolan.org
Fri Nov 2 14:32:40 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon Oct 22 13:26:46 2012 -0400| [a346aaf148dc2ce53da30e2f67223834495c0fd6] | committer: Justin Ruggles

g726dec: do not validate sample rate

For decoding it does not really matter what the sample rate is.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a346aaf148dc2ce53da30e2f67223834495c0fd6
---

 libavcodec/g726.c |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index ed4bd26..91b5e54 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -422,14 +422,6 @@ static av_cold int g726_decode_init(AVCodecContext *avctx)
 {
     G726Context* c = avctx->priv_data;
 
-    if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT &&
-        avctx->sample_rate != 8000) {
-        av_log(avctx, AV_LOG_ERROR, "Only 8kHz sample rate is allowed when "
-               "the compliance level is strict. Reduce the compliance level "
-               "if you wish to decode the stream anyway.\n");
-        return AVERROR(EINVAL);
-    }
-
     avctx->channels       = 1;
     avctx->channel_layout = AV_CH_LAYOUT_MONO;
 



More information about the ffmpeg-cvslog mailing list