提交 ecabfc7f authored 作者: Dragos Oancea's avatar Dragos Oancea

FS-8005: mod_opus : fix for rare decoder error when doing PLC,…

FS-8005: mod_opus : fix for rare decoder error when doing PLC, OPUS_GET_LAST_PACKET_DURATION might return 0
上级 c52969fc
...@@ -571,6 +571,9 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec, ...@@ -571,6 +571,9 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec,
plc = 1; plc = 1;
encoded_data = NULL; encoded_data = NULL;
opus_decoder_ctl(context->decoder_object, OPUS_GET_LAST_PACKET_DURATION(&frame_size)); opus_decoder_ctl(context->decoder_object, OPUS_GET_LAST_PACKET_DURATION(&frame_size));
if (!frame_size) {
frame_size = frame_samples - (frame_samples % (codec->implementation->actual_samples_per_second / 400));
}
if (context->codec_settings.useinbandfec) { if (context->codec_settings.useinbandfec) {
fec = 1; fec = 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论