Commit 1030c33e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fix textstream crash

parent ca35de0f
......@@ -139,6 +139,9 @@ TextStream* text_stream_start(TextStream *stream, RtpProfile *profile, const cha
void text_stream_stop(TextStream *stream) {
if (stream->ms.sessions.ticker) {
if (stream->ms.state == MSStreamPreparing) {
text_stream_unprepare_text(stream);
} else if (stream->ms.state == MSStreamStarted) {
MSConnectionHelper h;
stream->ms.state = MSStreamStopped;
ms_ticker_detach(stream->ms.sessions.ticker, stream->rttsource);
......@@ -159,6 +162,7 @@ void text_stream_stop(TextStream *stream) {
ms_connection_helper_unlink(&h, stream->ms.rtprecv, -1, 0);
ms_connection_helper_unlink(&h, stream->rttsink, 0, -1);
}
}
text_stream_free(stream);
ms_filter_log_statistics();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment