From 21e20ac9f26af9f31d5c417fc3c26927b59e2d36 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 10 May 2017 12:36:08 +0200 Subject: [PATCH] Initialize H264 context size for GFX surfaces. --- libfreerdp/gdi/gfx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libfreerdp/gdi/gfx.c b/libfreerdp/gdi/gfx.c index 05a5e31..a78a2a1 100644 --- a/libfreerdp/gdi/gfx.c +++ b/libfreerdp/gdi/gfx.c @@ -424,6 +424,9 @@ static UINT gdi_SurfaceCommand_AVC420(rdpGdi* gdi, WLog_ERR(TAG, "%s: unable to create h264 context", __FUNCTION__); return ERROR_NOT_ENOUGH_MEMORY; } + + if (!h264_context_reset(surface->h264, surface->width, surface->height)) + return ERROR_INTERNAL_ERROR; } bs = (RDPGFX_AVC420_BITMAP_STREAM*) cmd->extra; @@ -493,6 +496,9 @@ static UINT gdi_SurfaceCommand_AVC444(rdpGdi* gdi, RdpgfxClientContext* context, WLog_ERR(TAG, "%s: unable to create h264 context", __FUNCTION__); return ERROR_NOT_ENOUGH_MEMORY; } + + if (!h264_context_reset(surface->h264, surface->width, surface->height)) + return ERROR_INTERNAL_ERROR; } bs = (RDPGFX_AVC444_BITMAP_STREAM*) cmd->extra; -- 2.7.4