mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 22:54:18 +00:00
prevent buffer destroy race
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13219 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
e9c8418a89
commit
fae50b4197
2 files changed
+10
-1
No files matched your search
@@ -915,6 +915,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
||||
} else {
|
||||
switch_size_t x;
|
||||
for (x = 0; x < frames; x++) {
|
||||
if (switch_channel_down(session->channel) || !session->raw_write_buffer) {
|
||||
goto error;
|
||||
}
|
||||
if ((session->raw_write_frame.datalen = (uint32_t)
|
||||
switch_buffer_read(session->raw_write_buffer, session->raw_write_frame.data, bytes)) != 0) {
|
||||
int rate;
|
||||
|
||||
Reference in new issue
Block a user