mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-07 08:21:08 +00:00
try to fix possible null codec issue
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12975 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2aafa8bddd
commit
db4b1ae9c1
@ -1144,7 +1144,6 @@ PBoolean FSMediaStream::Open()
|
|||||||
m_switchCodec->implementation->samples_per_packet,
|
m_switchCodec->implementation->samples_per_packet,
|
||||||
switch_core_session_get_pool(m_fsSession)) != SWITCH_STATUS_SUCCESS) {
|
switch_core_session_get_pool(m_fsSession)) != SWITCH_STATUS_SUCCESS) {
|
||||||
switch_core_codec_destroy(m_switchCodec);
|
switch_core_codec_destroy(m_switchCodec);
|
||||||
m_switchCodec = NULL;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1172,11 +1171,6 @@ PBoolean FSMediaStream::Close()
|
|||||||
if (!IsOpen())
|
if (!IsOpen())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* forget these FS will properly destroy them for us */
|
|
||||||
|
|
||||||
m_switchTimer = NULL;
|
|
||||||
m_switchCodec = NULL;
|
|
||||||
|
|
||||||
return OpalMediaStream::Close();
|
return OpalMediaStream::Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1261,6 +1255,10 @@ switch_status_t FSMediaStream::read_frame(switch_frame_t **frame, switch_io_flag
|
|||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!switch_core_codec_ready(m_switchCodec)) {
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
//switch_core_timer_step(&m_switchTimer);
|
//switch_core_timer_step(&m_switchTimer);
|
||||||
|
|
||||||
m_readFrame.buflen = m_readRTP.GetSize();
|
m_readFrame.buflen = m_readRTP.GetSize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user