mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 13:28:31 +00:00
FS-3882, FS-3546, FS-3712, FS-3970: --resolve Fixes the segfault in mod_rtmp where the channel was destroyed, but the endpoint still tried to send or receive data from the session.
This commit is contained in:
1 parent
9b33675545
commit
79069c66d1
2 files changed
+7
No files matched your search
@@ -906,10 +906,12 @@ switch_status_t rtmp_handle_data(rtmp_session_t *rsession)
|
||||
rtmp_handle_invoke(rsession, rsession->amfnumber);
|
||||
break;
|
||||
case RTMP_TYPE_AUDIO: /* Audio data */
|
||||
switch_thread_rwlock_wrlock(rsession->rwlock);
|
||||
if (rsession->tech_pvt) {
|
||||
uint16_t len = state->origlen;
|
||||
|
||||
if (!rsession->tech_pvt->readbuf) {
|
||||
switch_thread_rwlock_unlock(rsession->rwlock);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
@@ -936,6 +938,8 @@ switch_status_t rtmp_handle_data(rtmp_session_t *rsession)
|
||||
}
|
||||
switch_mutex_unlock(rsession->tech_pvt->readbuf_mutex);
|
||||
}
|
||||
switch_thread_rwlock_unlock(rsession->rwlock);
|
||||
|
||||
break;
|
||||
case RTMP_TYPE_VIDEO: /* Video data */
|
||||
case RTMP_TYPE_METADATA: /* Metadata */
|
||||
|
||||
Reference in new issue
Block a user