diff options
Diffstat (limited to 'libavcodec/sipr.c')
-rw-r--r-- | libavcodec/sipr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c index 4502fa5f2a..65440db224 100644 --- a/libavcodec/sipr.c +++ b/libavcodec/sipr.c @@ -4,20 +4,20 @@ * Copyright (c) 2008 Vladimir Voroshilov * Copyright (c) 2009 Vitor Sessak * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -487,7 +487,10 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx) case 37: ctx->mode = MODE_5k0; break; default: av_log(avctx, AV_LOG_ERROR, "Invalid block_align: %d\n", avctx->block_align); - return AVERROR(EINVAL); + if (avctx->bit_rate > 12200) ctx->mode = MODE_16k; + else if (avctx->bit_rate > 7500 ) ctx->mode = MODE_8k5; + else if (avctx->bit_rate > 5750 ) ctx->mode = MODE_6k5; + else ctx->mode = MODE_5k0; } av_log(avctx, AV_LOG_DEBUG, "Mode: %s\n", modes[ctx->mode].mode_name); |