Skip to content

Commit

Permalink
Fix broken ondemand mountpoints when using viewer offers in Streaming…
Browse files Browse the repository at this point in the history
… plugin
  • Loading branch information
lminiero committed May 10, 2023
1 parent 2c4a25c commit 67c8352
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/plugins/janus_streaming.c
Expand Up @@ -6435,6 +6435,22 @@ static void *janus_streaming_handler(void *data) {
if(subscribed == NULL) {
/* FIXME Ended up not subscribing to any stream? */
JANUS_LOG(LOG_WARN, "Not subscribed to any stream (all m-lines rejected)\n");
} else if(mp->streaming_type == janus_streaming_type_on_demand) {
/* Spawn a thread */
GError *error = NULL;
char tname[16];
g_snprintf(tname, sizeof(tname), "mp %s", mp->id_str);
janus_refcount_increase(&session->ref);
janus_refcount_increase(&mp->ref);
g_thread_try_new(tname, &janus_streaming_ondemand_thread, session, &error);
if(error != NULL) {
JANUS_LOG(LOG_ERR, "Got error %d (%s) trying to launch the on-demand thread...\n",
error->code, error->message ? error->message : "??");
error_code = JANUS_STREAMING_ERROR_UNKNOWN_ERROR;
g_snprintf(error_cause, 512, "Got error %d (%s) trying to launch the on-demand thread",
error->code, error->message ? error->message : "??");
g_error_free(error);
}
}
g_list_free(subscribed);
/* Prepare the response */
Expand Down

0 comments on commit 67c8352

Please sign in to comment.