Merge pull request #4428 from hardening/video_fixes

fixes for video and other minor fixes
This commit is contained in:
akallabeth 2018-02-14 10:52:24 +01:00 committed by GitHub
commit ed4f54ab44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 15 deletions

View File

@ -393,8 +393,8 @@ static BOOL video_onMappedGeometryUpdate(MAPPED_GEOMETRY *geometry)
r->x, r->y, r->width, r->height
);
presentation->surface->x = geometry->left + r->x;
presentation->surface->y = geometry->top + r->y;
presentation->surface->x = geometry->topLevelLeft + geometry->left;
presentation->surface->y = geometry->topLevelTop + geometry->top;
return TRUE;
}
@ -455,8 +455,8 @@ static UINT video_PresentationRequest(VideoClientContext* video, TSMM_PRESENTATI
WLog_DBG(TAG, "creating presentation 0x%x", req->PresentationId);
presentation = PresentationContext_new(video, req->PresentationId,
geom->left + geom->geometry.boundingRect.x,
geom->top + geom->geometry.boundingRect.y,
geom->topLevelLeft + geom->left,
geom->topLevelTop + geom->top,
req->SourceWidth, req->SourceHeight);
if (!presentation)
{

View File

@ -1280,13 +1280,6 @@ static BOOL xf_post_connect(freerdp* instance)
return FALSE;
}
/* if (!(xfc->xfVideo = xf_video_new(xfc)))
{
xf_clipboard_free(xfc->clipboard);
xf_disp_free(xfc->xfDisp);
return FALSE;
}*/
EventArgsInit(&e, "xfreerdp");
e.width = settings->DesktopWidth;
e.height = settings->DesktopHeight;

View File

@ -146,8 +146,9 @@ static void xf_disp_OnGraphicsReset(rdpContext* context, GraphicsResetEventArgs*
}
}
static void xf_disp_OnTimer(rdpContext* context, TimerEventArgs* e)
static void xf_disp_OnTimer(void* voidContext, TimerEventArgs* e)
{
rdpContext* context = (rdpContext *)voidContext;
xfContext *xfc = (xfContext *)context;
xfDispContext *xfDisp = xfc->xfDisp;
rdpSettings *settings = context->settings;

View File

@ -650,7 +650,7 @@ HttpResponse* http_response_recv(rdpTls* tls)
}
#ifdef HAVE_VALGRIND_MEMCHECK_H
VALGRIND_MAKE_MEM_DEFINED(Stream_Pointer(s), status);
VALGRIND_MAKE_MEM_DEFINED(Stream_Pointer(response->data), status);
#endif
Stream_Seek(response->data, status);

View File

@ -140,9 +140,10 @@ void gdi_video_control_uninit(rdpGdi* gdi, VideoClientContext* video)
gdi->video = NULL;
}
static void gdi_video_timer(void* ctx, TimerEventArgs* timer)
static void gdi_video_timer(void *voidContext, TimerEventArgs* timer)
{
rdpGdi* gdi = (rdpGdi*)ctx;
rdpContext *ctx = (rdpContext *)voidContext;
rdpGdi* gdi = ctx->gdi;
if (gdi && gdi->video)
gdi->video->timer(gdi->video, timer->now);