Merge pull request #4859 from akallabeth/autoreconnect_gfx_fix
Fixed #4857: Properly reset clear codec.
This commit is contained in:
commit
24936c1858
@ -259,7 +259,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
|
||||
for (i = 0; i < runLengthFactor; i++)
|
||||
{
|
||||
BYTE* pTmpData = &pDstData[(nXDstRel + x) * GetBytesPerPixel(DstFormat) +
|
||||
(nYDstRel + y) * nDstStep];
|
||||
(nYDstRel + y) * nDstStep];
|
||||
|
||||
if ((nXDstRel + x < nDstWidth) && (nYDstRel + y < nDstHeight))
|
||||
WriteColor(pTmpData, DstFormat, color);
|
||||
@ -284,7 +284,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
|
||||
for (i = 0; i <= suiteDepth; i++)
|
||||
{
|
||||
BYTE* pTmpData = &pDstData[(nXDstRel + x) * GetBytesPerPixel(DstFormat) +
|
||||
(nYDstRel + y) * nDstStep];
|
||||
(nYDstRel + y) * nDstStep];
|
||||
UINT32 color = palette[suiteIndex];
|
||||
|
||||
if (suiteIndex > 127)
|
||||
@ -834,7 +834,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
|
||||
count = (vBarPixelCount > y) ? (vBarPixelCount - y) : 0;
|
||||
|
||||
pSrcPixel = &vBarShortEntry->pixels[(y - vBarYOn) * GetBytesPerPixel(
|
||||
clear->format)];
|
||||
clear->format)];
|
||||
|
||||
for (x = 0; x < count; x++)
|
||||
{
|
||||
@ -886,10 +886,10 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
|
||||
for (y = 0; y < count; y++)
|
||||
{
|
||||
BYTE* pDstPixel8 = &pDstData[((nYDstRel + y) * nDstStep) +
|
||||
((nXDstRel + i) * GetBytesPerPixel(DstFormat))];
|
||||
((nXDstRel + i) * GetBytesPerPixel(DstFormat))];
|
||||
UINT32 color = ReadColor(pSrcPixel, clear->format);
|
||||
color = FreeRDPConvertColor(color, clear->format,
|
||||
DstFormat, NULL);
|
||||
DstFormat, NULL);
|
||||
|
||||
if (!WriteColor(pDstPixel8, DstFormat, color))
|
||||
return FALSE;
|
||||
@ -1173,6 +1173,13 @@ BOOL clear_context_reset(CLEAR_CONTEXT* clear)
|
||||
return FALSE;
|
||||
|
||||
clear->seqNumber = 0;
|
||||
clear->VBarStorageCursor = 0;
|
||||
clear->ShortVBarStorageCursor = 0;
|
||||
|
||||
if (clear->nsc)
|
||||
nsc_context_reset(clear->nsc, clear->nsc->width, clear->nsc->height);
|
||||
|
||||
memset(clear->TempBuffer, 0, clear->TempSize);
|
||||
return TRUE;
|
||||
}
|
||||
CLEAR_CONTEXT* clear_context_new(BOOL Compressor)
|
||||
|
Loading…
Reference in New Issue
Block a user