FS-7513: trying to fix mutex

This commit is contained in:
Seven Du 2015-02-13 18:51:34 +08:00 committed by Michael Jerris
parent 9faf03c91e
commit 18a896d39d
1 changed files with 5 additions and 1 deletions

View File

@ -897,10 +897,13 @@ static void reset_layer(mcu_canvas_t *canvas, mcu_layer_t *layer)
static void scale_and_patch(conference_obj_t *conference, mcu_layer_t *layer)
{
int ret;
switch_image_t *IMG = conference->canvas->img, *img = layer->cur_img;
switch_image_t *IMG, *img;
switch_mutex_lock(conference->canvas->mutex);
IMG = conference->canvas->img;
img = layer->cur_img;
if (layer->geometry.scale) {
int img_w = 0, img_h = 0;
double screen_aspect = 0, img_aspect = 0;
@ -1200,6 +1203,7 @@ static switch_status_t attach_video_layer(conference_member_t *member, int idx)
switch_color_set_rgb(&color, member->conference->video_layout_bgcolor);
switch_mutex_lock(member->conference->canvas->mutex);
switch_img_fill(member->conference->canvas->img, layer->x_pos, layer->y_pos, layer->screen_w, layer->screen_h, &color);