Richard Stanway 2b131d212f obs-outputs: Fix librtmp mbedtls thread safety
Per mbedtls documentation, "If you share a context between threads, you
need to call these functions only from the main thread, at the beginning
and end of the context's lifetime.". OBS violated this since librtmp
uses a global context and it was allocated and freed in different
threads such as the auto config test.

This commit attaches the mbedtls context to an RTMP structure so there
is no more global state. It also fixes a rare double-free crash that
could occur if RTMP_TLS_Free was called twice (this happened in rare
situations such as the auto config running followed by a mode change
from Advanced to Simple).
2020-01-23 00:11:23 +01:00
..
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00
2014-04-01 11:48:28 -07:00