Fixed ima_adpcm encoder bug.
This commit is contained in:
parent
b9645c9247
commit
6029a411e2
@ -607,13 +607,15 @@ static BOOL freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
|
|||||||
BYTE encoded;
|
BYTE encoded;
|
||||||
UINT32 out_size;
|
UINT32 out_size;
|
||||||
out_size = size / 2;
|
out_size = size / 2;
|
||||||
|
size_t align;
|
||||||
|
|
||||||
if (!Stream_EnsureRemainingCapacity(out, size))
|
if (!Stream_EnsureRemainingCapacity(out, size))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
start = dst = Stream_Pointer(out);
|
start = dst = Stream_Pointer(out);
|
||||||
|
align = (context->format.nChannels > 1) ? 32 : 4;
|
||||||
|
|
||||||
while (size > 0)
|
while (size > align)
|
||||||
{
|
{
|
||||||
if ((dst - start) % context->format.nBlockAlign == 0)
|
if ((dst - start) % context->format.nBlockAlign == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user