channels/rdpgfx: fix TotalDecodedFrames counter

This commit is contained in:
Marc-André Moreau 2015-07-08 14:16:29 -04:00
parent 23f9b3bbc0
commit aae86d61ce

View File

@ -370,6 +370,9 @@ int rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
context->EndFrame(context, &pdu); context->EndFrame(context, &pdu);
} }
gfx->UnacknowledgedFrames--;
gfx->TotalDecodedFrames++;
ack.frameId = pdu.frameId; ack.frameId = pdu.frameId;
ack.totalFramesDecoded = gfx->TotalDecodedFrames; ack.totalFramesDecoded = gfx->TotalDecodedFrames;
@ -377,7 +380,7 @@ int rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{ {
ack.queueDepth = SUSPEND_FRAME_ACKNOWLEDGEMENT; ack.queueDepth = SUSPEND_FRAME_ACKNOWLEDGEMENT;
if (gfx->TotalDecodedFrames == 0) if (gfx->TotalDecodedFrames == 1)
rdpgfx_send_frame_acknowledge_pdu(callback, &ack); rdpgfx_send_frame_acknowledge_pdu(callback, &ack);
} }
else else
@ -386,9 +389,6 @@ int rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
rdpgfx_send_frame_acknowledge_pdu(callback, &ack); rdpgfx_send_frame_acknowledge_pdu(callback, &ack);
} }
gfx->UnacknowledgedFrames--;
gfx->TotalDecodedFrames++;
return 1; return 1;
} }