mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: sipr: fall back to setting mode based on bit_rate. Conflicts: libavcodec/sipr.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
8364bde02b
@ -485,11 +485,13 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
|
||||
case 29: ctx->mode = MODE_6k5; break;
|
||||
case 37: ctx->mode = MODE_5k0; break;
|
||||
default:
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid block_align: %d\n", avctx->block_align);
|
||||
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_WARNING,
|
||||
"Invalid block_align: %d. Mode %s guessed based on bitrate: %d\n",
|
||||
avctx->block_align, modes[ctx->mode].mode_name, avctx->bit_rate);
|
||||
}
|
||||
|
||||
av_log(avctx, AV_LOG_DEBUG, "Mode: %s\n", modes[ctx->mode].mode_name);
|
||||
|
Loading…
Reference in New Issue
Block a user