]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10409: [core] Crash (ABRT) using conferencing -- related to FS-10132 #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 26 Jun 2017 21:31:34 +0000 (16:31 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 26 Jun 2017 23:16:48 +0000 (18:16 -0500)
src/mod/applications/mod_conference/conference_video.c

index fb8555d3bba76be92c6a703f59cf58cf8ef316f4..f2f203980fa52f6e430aa3fa8623899fed27020a 100644 (file)
@@ -3446,9 +3446,9 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
                                        if (conference->members_with_video == 1 && file_count) {
                                                total = 0;
                                        }
-                                       
+
                                        if (conference->video_layout_group && (lg = switch_core_hash_find(conference->layout_group_hash, conference->video_layout_group))) {
-                                               if ((vlayout = conference_video_find_best_layout(conference, lg, total + file_count, file_count))) {
+                                               if ((vlayout = conference_video_find_best_layout(conference, lg, total, 0))) {
                                                        conference_video_init_canvas_layers(conference, imember->canvas, vlayout);
                                                }
                                        }
@@ -3639,8 +3639,6 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
                                                layer = &imember->canvas->layers[i++];
                                                conference_video_scale_and_patch(layer, img, SWITCH_FALSE);
                                        }
-
-                                       switch_img_free(&img);
                                }
 
                                if (imember->session) {
@@ -3648,9 +3646,11 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
                                }
                        }
 
+                       for (j = 0; j < file_count; j++) {
+                               switch_img_free(&file_imgs[j]);
+                       }
+
                        if (files_playing && !file_count) {
-                               switch_img_free(&file_imgs[0]);
-                               switch_img_free(&file_imgs[1]);
                                files_playing = 0;
                        }