FS-7513: prevent null layer img

This commit is contained in:
Anthony Minessale 2015-04-20 11:04:36 -05:00 committed by Michael Jerris
parent 70198e0d28
commit e5dae7e602
1 changed files with 12 additions and 5 deletions

View File

@ -1044,6 +1044,8 @@ static void scale_and_patch(conference_obj_t *conference, mcu_layer_t *layer, sw
IMG = conference->canvas->img;
img = ximg ? ximg : layer->cur_img;
switch_assert(IMG && img);
if (layer->refresh) {
switch_rgb_color_t color;
switch_color_set_rgb(&color, conference->video_layout_bgcolor);
@ -2003,7 +2005,9 @@ static void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread
switch_img_free(&img);
}
} else {
}
if (img && !layer->cur_img) {
layer->cur_img = img;
}
@ -2013,6 +2017,7 @@ static void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread
}
switch_mutex_unlock(conference->canvas->mutex);
if (img && img != imember->avatar_png_img) {
switch_img_free(&img);
}
@ -2046,7 +2051,9 @@ static void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread
conference->canvas->refresh++;
}
if (layer->cur_img) {
scale_and_patch(conference, layer, NULL, SWITCH_FALSE);
}
layer->tagged = 0;
}
}