mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
fail calls with uninitialized frame
This commit is contained in:
parent
dcdd381195
commit
7dafe4e2c7
@ -666,6 +666,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!(frame->codec && frame->codec->implementation)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "%s has received a bad frame with no codec!\n",
|
||||
switch_channel_get_name(session->channel));
|
||||
switch_channel_hangup(session->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
switch_assert(frame->codec != NULL);
|
||||
switch_assert(frame->codec->implementation != NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user