diff --git a/include/freerdp/codec/rfx.h b/include/freerdp/codec/rfx.h index b45a8182b..1102ee01d 100644 --- a/include/freerdp/codec/rfx.h +++ b/include/freerdp/codec/rfx.h @@ -199,7 +199,8 @@ extern "C" FREERDP_API BOOL rfx_context_reset(RFX_CONTEXT* context, UINT32 width, UINT32 height); - FREERDP_API RFX_CONTEXT* rfx_context_new(BOOL encoder, UINT32 ThreadingFlags); + FREERDP_API RFX_CONTEXT* rfx_context_new_ex(BOOL encoder, UINT32 ThreadingFlags); + FREERDP_API RFX_CONTEXT* rfx_context_new(BOOL encoder); FREERDP_API void rfx_context_free(RFX_CONTEXT* context); #ifdef __cplusplus diff --git a/libfreerdp/codec/progressive.c b/libfreerdp/codec/progressive.c index bab525873..5190c7c1e 100644 --- a/libfreerdp/codec/progressive.c +++ b/libfreerdp/codec/progressive.c @@ -2603,7 +2603,7 @@ PROGRESSIVE_CONTEXT* progressive_context_new(BOOL Compressor) progressive->log = WLog_Get(TAG); if (!progressive->log) goto fail; - progressive->rfx_context = rfx_context_new(Compressor, 0); + progressive->rfx_context = rfx_context_new(Compressor); if (!progressive->rfx_context) goto fail; progressive->buffer = Stream_New(NULL, 1024); diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index 622eddd02..d30a67e43 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -195,7 +195,12 @@ static void rfx_encoder_tile_free(void* obj) free(obj); } -RFX_CONTEXT* rfx_context_new(BOOL encoder, UINT32 ThreadingFlags) +RFX_CONTEXT* rfx_context_new(BOOL encoder) +{ + return rfx_context_new_ex(encoder, 0); +} + +RFX_CONTEXT* rfx_context_new_ex(BOOL encoder, UINT32 ThreadingFlags) { HKEY hKey; LONG status; diff --git a/libfreerdp/core/codecs.c b/libfreerdp/core/codecs.c index 30aae7ff8..bfd10ccc3 100644 --- a/libfreerdp/core/codecs.c +++ b/libfreerdp/core/codecs.c @@ -65,7 +65,7 @@ BOOL freerdp_client_codecs_prepare(rdpCodecs* codecs, UINT32 flags, UINT32 width if ((flags & FREERDP_CODEC_REMOTEFX)) { rfx_context_free(codecs->rfx); - if (!(codecs->rfx = rfx_context_new(FALSE, codecs->context->settings->ThreadingFlags))) + if (!(codecs->rfx = rfx_context_new_ex(FALSE, codecs->context->settings->ThreadingFlags))) { WLog_ERR(TAG, "Failed to create rfx codec context"); return FALSE; diff --git a/server/Mac/mf_peer.c b/server/Mac/mf_peer.c index dfaeddd33..17c683eac 100644 --- a/server/Mac/mf_peer.c +++ b/server/Mac/mf_peer.c @@ -158,7 +158,7 @@ static BOOL mf_peer_context_new(freerdp_peer* client, mfPeerContext* context) if (!(context->info = mf_info_get_instance())) return FALSE; - if (!(context->rfx_context = rfx_context_new(TRUE, client->settings->ThreadingFlags))) + if (!(context->rfx_context = rfx_context_new_ex(TRUE, client->settings->ThreadingFlags))) goto fail_rfx_context; context->rfx_context->mode = RLGR3; diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index c8490bd22..eaf452a47 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -58,7 +58,7 @@ static BOOL test_dump_rfx_realtime = TRUE; static BOOL test_peer_context_new(freerdp_peer* client, rdpContext* ctx) { testPeerContext* context = (testPeerContext*)ctx; - if (!(context->rfx_context = rfx_context_new(TRUE, client->settings->ThreadingFlags))) + if (!(context->rfx_context = rfx_context_new_ex(TRUE, client->settings->ThreadingFlags))) goto fail_rfx_context; if (!rfx_context_reset(context->rfx_context, SAMPLE_SERVER_DEFAULT_WIDTH, diff --git a/server/Windows/wf_update.c b/server/Windows/wf_update.c index 114163f9e..01a74f0fc 100644 --- a/server/Windows/wf_update.c +++ b/server/Windows/wf_update.c @@ -188,7 +188,7 @@ void wf_update_encoder_reset(wfInfo* wfi) else { /* TODO: pass ThreadingFlags somehow */ - wfi->rfx_context = rfx_context_new(TRUE, 0); + wfi->rfx_context = rfx_context_new(TRUE); wfi->rfx_context->mode = RLGR3; wfi->rfx_context->width = wfi->servscreen_width; wfi->rfx_context->height = wfi->servscreen_height; diff --git a/server/shadow/shadow_encoder.c b/server/shadow/shadow_encoder.c index e2a4ae45c..0cec2d9f4 100644 --- a/server/shadow/shadow_encoder.c +++ b/server/shadow/shadow_encoder.c @@ -132,7 +132,7 @@ static int shadow_encoder_uninit_grid(rdpShadowEncoder* encoder) static int shadow_encoder_init_rfx(rdpShadowEncoder* encoder) { if (!encoder->rfx) - encoder->rfx = rfx_context_new(TRUE, encoder->server->settings->ThreadingFlags); + encoder->rfx = rfx_context_new_ex(TRUE, encoder->server->settings->ThreadingFlags); if (!encoder->rfx) goto fail;