提交 8a56d8a0 authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Michael Jerris

FS-7508: seems to work better restarting on error

上级 5ce10274
...@@ -517,7 +517,7 @@ static switch_status_t switch_vpx_decode(switch_codec_t *codec, switch_frame_t * ...@@ -517,7 +517,7 @@ static switch_status_t switch_vpx_decode(switch_codec_t *codec, switch_frame_t *
(!frame->m) && (!context->last_received_complete_picture)) { (!frame->m) && (!context->last_received_complete_picture)) {
// possible packet loss // possible packet loss
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Packet Loss, skip previous received frame (to avoid crash?)\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Packet Loss, skip previous received frame (to avoid crash?)\n");
switch_goto_status(SWITCH_STATUS_NOTFOUND, end); switch_goto_status(SWITCH_STATUS_RESTART, end);
} }
context->last_received_timestamp = frame->timestamp; context->last_received_timestamp = frame->timestamp;
...@@ -552,7 +552,7 @@ static switch_status_t switch_vpx_decode(switch_codec_t *codec, switch_frame_t * ...@@ -552,7 +552,7 @@ static switch_status_t switch_vpx_decode(switch_codec_t *codec, switch_frame_t *
if (err != VPX_CODEC_OK) { if (err != VPX_CODEC_OK) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error decoding %" SWITCH_SIZE_T_FMT " bytes, [%d:%d:%s]\n", len, err, decoder->err, decoder->err_detail); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error decoding %" SWITCH_SIZE_T_FMT " bytes, [%d:%d:%s]\n", len, err, decoder->err, decoder->err_detail);
switch_goto_status(SWITCH_STATUS_NOTFOUND, end); switch_goto_status(SWITCH_STATUS_RESTART, end);
} }
if (vpx_codec_control(decoder, VP8D_GET_FRAME_CORRUPTED, &corrupted) != VPX_CODEC_OK) { if (vpx_codec_control(decoder, VP8D_GET_FRAME_CORRUPTED, &corrupted) != VPX_CODEC_OK) {
...@@ -564,7 +564,7 @@ static switch_status_t switch_vpx_decode(switch_codec_t *codec, switch_frame_t * ...@@ -564,7 +564,7 @@ static switch_status_t switch_vpx_decode(switch_codec_t *codec, switch_frame_t *
if (!(frame->img) || corrupted) { if (!(frame->img) || corrupted) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "VPX invalid packet\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "VPX invalid packet\n");
switch_goto_status(SWITCH_STATUS_NOTFOUND, end); switch_goto_status(SWITCH_STATUS_RESTART, end);
} }
switch_buffer_zero(context->vpx_packet_buffer); switch_buffer_zero(context->vpx_packet_buffer);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论