Skip to content
Snippets Groups Projects
Commit 65b2cc7d authored by Sergio Ammirata's avatar Sergio Ammirata
Browse files

Make the call to the rist_logging_settings thread safe.

parent a82ebbaf
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,7 @@ typedef struct
bool b_sendnacks;
bool b_disablenacks;
rist_log_t rist_log_callback_arg;
struct rist_logging_settings logging_settings;
} stream_sys_t;
static int cb_stats(void *arg, const struct rist_stats *stats_container)
......@@ -261,7 +262,7 @@ static int Open(vlc_object_t *p_this)
int rist_profile = var_InheritInteger(p_access, RIST_CFG_PREFIX RIST_URL_PARAM_PROFILE);
int i_verbose_level = var_InheritInteger( p_access, RIST_CFG_PREFIX RIST_URL_PARAM_VERBOSE_LEVEL );
static struct rist_logging_settings *logging_settings;
struct rist_logging_settings *logging_settings = &p_sys->logging_settings;;
p_sys->rist_log_callback_arg.p_access = (vlc_object_t *)p_access;
......
......@@ -68,6 +68,7 @@ typedef struct
uint32_t recovery_buffer;
size_t i_max_packet_size;
rist_log_t rist_log_callback_arg;
struct rist_logging_settings logging_settings;
} sout_access_out_sys_t;
static int cb_stats(void *arg, const struct rist_stats *stats_container)
......@@ -214,7 +215,6 @@ static int Open( vlc_object_t *p_this )
{
sout_access_out_t *p_access = (sout_access_out_t*)p_this;
sout_access_out_sys_t *p_sys = NULL;
static struct rist_logging_settings *logging_settings;
if (var_Create ( p_access, "dst-port", VLC_VAR_INTEGER )
|| var_Create ( p_access, "src-port", VLC_VAR_INTEGER )
......@@ -249,6 +249,8 @@ static int Open( vlc_object_t *p_this )
p_sys->rist_log_callback_arg.p_access = (vlc_object_t *)p_access;
struct rist_logging_settings *logging_settings = &p_sys->logging_settings;
if (rist_logging_set(&logging_settings, i_verbose_level, log_cb, (void *)&p_sys->rist_log_callback_arg, NULL, stderr) != 0) {
msg_Err(p_access,"Could not set logging\n");
goto failed;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment