projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9645c9
)
Fixed ima_adpcm encoder bug.
author
Armin Novak
<armin.novak@thincast.com>
Tue, 17 Jul 2018 10:57:57 +0000
(12:57 +0200)
committer
Armin Novak
<armin.novak@thincast.com>
Tue, 17 Jul 2018 10:57:57 +0000
(12:57 +0200)
libfreerdp/codec/dsp.c
patch
|
blob
|
history
diff --git
a/libfreerdp/codec/dsp.c
b/libfreerdp/codec/dsp.c
index
f39648d
..
0144ec4
100644
(file)
--- a/
libfreerdp/codec/dsp.c
+++ b/
libfreerdp/codec/dsp.c
@@
-607,13
+607,15
@@
static BOOL freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
BYTE encoded;
UINT32 out_size;
out_size = size / 2;
+ size_t align;
if (!Stream_EnsureRemainingCapacity(out, size))
return FALSE;
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)
{