On Thu, Nov 12, 2015 at 1:24 PM, Pavel Grunt <pgrunt@xxxxxxxxxx> wrote: > Avoid creating streams for every image due to not properly initialized > DisplayChannel->stream_video field. > > Regression since: 4987df8e67f48cde13d39f4e81909f672ae33e29 > --- > server/red_worker.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/server/red_worker.c b/server/red_worker.c > index be2f8d6..8ebf9dd 100644 > --- a/server/red_worker.c > +++ b/server/red_worker.c > @@ -1999,13 +1999,12 @@ static void before_reattach_stream(DisplayChannel *display, > } > } > > -static void update_copy_graduality(Drawable *drawable) > +static void update_copy_graduality(DisplayChannel *display, Drawable *drawable) > { > SpiceBitmap *bitmap; > spice_return_if_fail(drawable->red_drawable->type == QXL_DRAW_COPY); > > - /* TODO: global property -> per dc/dcc */ > - if (streaming_video != SPICE_STREAM_VIDEO_FILTER) { > + if (display->stream_video != SPICE_STREAM_VIDEO_FILTER) { > drawable->copy_bitmap_graduality = BITMAP_GRADUAL_INVALID; > return; > } > @@ -2038,7 +2037,7 @@ static int display_channel_stream_add_frame(DisplayChannel *display, > int gradual_frames_count, > int last_gradual_frame) > { > - update_copy_graduality(frame_drawable); > + update_copy_graduality(display, frame_drawable); > frame_drawable->frames_count = frames_count + 1; > frame_drawable->gradual_frames_count = gradual_frames_count; > > @@ -8561,7 +8560,7 @@ static void init_streams(DisplayChannel *display) > } > } > > -static void display_channel_create(RedWorker *worker, int migrate) > +static void display_channel_create(RedWorker *worker, int migrate, int stream_video) > { > DisplayChannel *display_channel; > ChannelCbs cbs = { > @@ -8609,6 +8608,7 @@ static void display_channel_create(RedWorker *worker, int migrate) > display_channel->num_renderers = num_renderers; > memcpy(display_channel->renderers, renderers, sizeof(display_channel->renderers)); > display_channel->renderer = RED_RENDERER_INVALID; > + display_channel->stream_video = stream_video; > init_streams(display_channel); > image_cache_init(&display_channel->image_cache); > ring_init(&display_channel->current_list); > @@ -9776,7 +9776,7 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher) > > worker->cursor_channel = cursor_channel_new(worker); > // TODO: handle seemless migration. Temp, setting migrate to FALSE > - display_channel_create(worker, FALSE); > + display_channel_create(worker, FALSE, streaming_video); > > return worker; > } > -- > 2.5.0 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/spice-devel ACK, nice catch btw! _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel