Mercurial > mplayer.hg
changeset 36161:025d6c8eebb6
Simplify check whether byte swapping is necessary.
author | reimar |
---|---|
date | Thu, 09 May 2013 10:53:17 +0000 |
parents | d1a0ad142823 |
children | cb10031f4ead |
files | libmpcodecs/ad_hwac3.c |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_hwac3.c Thu May 09 10:53:16 2013 +0000 +++ b/libmpcodecs/ad_hwac3.c Thu May 09 10:53:17 2013 +0000 @@ -551,13 +551,8 @@ buf16[3] = fsize << 3; if (!convert_16bits) { -#if HAVE_BIGENDIAN - /* BE stream */ - if (indata_ptr[0] == 0x1f || indata_ptr[0] == 0x7f) -#else - /* LE stream */ - if (indata_ptr[0] == 0xff || indata_ptr[0] == 0xfe) -#endif + int be_stream = indata_ptr[0] == 0x1f || indata_ptr[0] == 0x7f; + if (be_stream == HAVE_BIGENDIAN) memcpy(&buf[8], indata_ptr, fsize); else {