From: Tzafrir Cohen Date: Wed, 29 Oct 2014 13:02:27 +0000 (+0000) Subject: Fix building chan_phone on big endian systems X-Git-Tag: 14.0.0-beta1~1517 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a69aedd17b7b0c3e9e5b0b88483b6a2536cabc1;p=thirdparty%2Fasterisk.git Fix building chan_phone on big endian systems A left over from the formats conversion (Corey Farrell). ASTERISK-24458 #close Review: https://reviewboard.asterisk.org/r/4117/ ........ Merged revisions 426570 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426573 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_phone.c b/channels/chan_phone.c index ced9b1390a..2bf7bddb4d 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -827,7 +827,7 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame) } else { int swap = 0; #if __BYTE_ORDER == __BIG_ENDIAN - if (frame->subclass.format.id == AST_FORMAT_SLINEAR) + if (ast_format_cmp(frame->subclass.format, ast_format_slin) == AST_FORMAT_CMP_EQUAL) swap = 1; /* Swap big-endian samples to little-endian as we copy */ #endif res = phone_write_buf(p, pos, expected, maxfr, swap);