diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index a19786b..b9eb55b 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -217,6 +217,14 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, return -1; } st->codec->block_align = ff_sipr_subpk_size[flavor]; + if (version == 4) { + switch (st->codec->block_align) { + case 20: st->codec->bit_rate = 16000; break; + case 19: st->codec->bit_rate = 8500; break; + case 29: st->codec->bit_rate = 6500; break; + case 37: st->codec->bit_rate = 5000; break; + } + } } else { if(sub_packet_size <= 0){ av_log(s, AV_LOG_ERROR, "sub_packet_size is invalid\n");