]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7513: move thread create and fix missing mutex unlock
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 4 Mar 2015 16:37:20 +0000 (10:37 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:08 +0000 (12:47 -0500)
src/mod/applications/mod_conference/mod_conference.c

index fc59687d3a89f7da70b215e73564916854efa08e..0704076dff2db92289197e08fefc5ed4a185b260 100644 (file)
@@ -1759,6 +1759,7 @@ static void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread
 
                                if (imember->video_codec_index < 0) {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Write Codec Error\n");
+                                       switch_core_session_rwunlock(imember->session);
                                        continue;
                                }
                        }
@@ -4622,9 +4623,6 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
                                }
                                
                                if (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_VIDEO)) {
-                                       if (conference->video_layout_name && !conference->video_muxing_thread) {
-                                               launch_conference_video_muxing_thread(conference);
-                                       }
                                        members_with_video++;
                                }
 
@@ -12643,6 +12641,10 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
        switch_core_hash_insert(globals.conference_hash, conference->name, conference);
        switch_mutex_unlock(globals.hash_mutex);
 
+       if (conference->video_layout_name && !conference->video_muxing_thread) {
+               launch_conference_video_muxing_thread(conference);
+       }
+
   end:
 
        switch_mutex_unlock(globals.hash_mutex);