From 0c2f6d59dd1c1703516215281cd5d1c478d18de7 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Thu, 13 Jun 2013 16:38:31 +0200 Subject: [PATCH] core: update play-rfx to work with async-updates --- libfreerdp/core/freerdp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index 15d259ac3..51e0158ef 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -126,7 +126,6 @@ BOOL freerdp_connect(freerdp* instance) update = instance->update; - s = StreamPool_Take(rdp->transport->ReceivePool, 0); update->pcap_rfx = pcap_open(settings->PlayRemoteFxFile, FALSE); if (!update->pcap_rfx) @@ -139,7 +138,7 @@ BOOL freerdp_connect(freerdp* instance) pcap_get_next_record_header(update->pcap_rfx, &record); - Stream_EnsureCapacity(s, record.length); + s = StreamPool_Take(rdp->transport->ReceivePool, record.length); record.data = Stream_Buffer(s); pcap_get_next_record_content(update->pcap_rfx, &record); @@ -149,9 +148,9 @@ BOOL freerdp_connect(freerdp* instance) update->BeginPaint(update->context); update_recv_surfcmds(update, Stream_Length(s) , s); update->EndPaint(update->context); + Stream_Release(s); } - Stream_Release(s); return TRUE; } }