fail properly on bad decode
This commit is contained in:
parent
7ac1d38d98
commit
7555cabbba
|
@ -863,9 +863,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
|||
session->write_impl.actual_samples_per_second,
|
||||
session->raw_write_frame.data, &session->raw_write_frame.datalen, &session->raw_write_frame.rate, &frame->flags);
|
||||
|
||||
|
||||
|
||||
|
||||
if (do_resample && status == SWITCH_STATUS_SUCCESS) {
|
||||
status = SWITCH_STATUS_RESAMPLE;
|
||||
}
|
||||
|
@ -918,11 +915,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
|||
status = SWITCH_STATUS_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
|
||||
if (status == SWITCH_STATUS_NOT_INITALIZED) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Codec init error!\n");
|
||||
goto error;
|
||||
}
|
||||
if (ptime_mismatch) {
|
||||
if (ptime_mismatch && status != SWITCH_STATUS_GENERR) {
|
||||
status = perform_write(session, frame, flags, stream_id);
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
goto error;
|
||||
|
|
Loading…
Reference in New Issue