[cast] Fix segfault from cast_master_session not being reset

This commit is contained in:
ejurgensen 2019-03-02 00:30:43 +01:00
parent f8b0147b12
commit 01797662de
1 changed files with 5 additions and 1 deletions

View File

@ -361,7 +361,8 @@ struct cast_msg_basic cast_msg[] =
// codecName can be aac or opus, ssrc should be random // codecName can be aac or opus, ssrc should be random
// We don't set 'aesKey' and 'aesIvMask' // We don't set 'aesKey' and 'aesIvMask'
// sampleRate seems to be ignored // sampleRate seems to be ignored
// storeTime unknown meaning // storeTime unknown meaning - perhaps size of buffer?
// targetDelay - should be RTP delay in ms, but doesn't seem to change anything?
.payload = "{'type':'OFFER','seqNum':%d,'offer':{'castMode':'mirroring','supportedStreams':[{'index':0,'type':'audio_source','codecName':'opus','rtpProfile':'cast','rtpPayloadType':127,'ssrc':%d,'storeTime':400,'targetDelay':400,'bitRate':128000,'sampleRate':48000,'timeBase':'1/48000','channels':2,'receiverRtcpEventLog':false}]}}", .payload = "{'type':'OFFER','seqNum':%d,'offer':{'castMode':'mirroring','supportedStreams':[{'index':0,'type':'audio_source','codecName':'opus','rtpProfile':'cast','rtpPayloadType':127,'ssrc':%d,'storeTime':400,'targetDelay':400,'bitRate':128000,'sampleRate':48000,'timeBase':'1/48000','channels':2,'receiverRtcpEventLog':false}]}}",
.flags = USE_TRANSPORT_ID | USE_REQUEST_ID, .flags = USE_TRANSPORT_ID | USE_REQUEST_ID,
}, },
@ -618,6 +619,9 @@ master_session_cleanup(struct cast_master_session *cms)
return; return;
} }
if (cms == cast_master_session)
cast_master_session = NULL;
master_session_free(cms); master_session_free(cms);
} }