mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
fix breakage from slin endianness commit earlier today (sorry :-()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -559,7 +559,7 @@ static int phone_write_buf(struct phone_pvt *p, const char *buf, int len, int fr
|
||||
if (space < len)
|
||||
len = space;
|
||||
if (swap)
|
||||
ast_memcpy_byteswap(p->obuf+p->obuflen, buf, len/2);
|
||||
ast_swapcopy_samples(p->obuf+p->obuflen, buf, len/2);
|
||||
else
|
||||
memcpy(p->obuf + p->obuflen, buf, len);
|
||||
p->obuflen += len;
|
||||
|
@@ -859,7 +859,7 @@ void iax_frame_wrap(struct iax_frame *fr, struct ast_frame *f)
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
/* We need to byte-swap slinear samples from network byte order */
|
||||
if (fr->af.subclass == AST_FORMAT_SLINEAR) {
|
||||
ast_memcpy_byteswap(fr->af.data, f->data, fr->af.samples);
|
||||
ast_swapcopy_samples(fr->af.data, f->data, fr->af.samples);
|
||||
} else
|
||||
#endif
|
||||
memcpy(fr->af.data, f->data, fr->af.datalen);
|
||||
|
Reference in New Issue
Block a user