# HG changeset patch # User reimar # Date 1368096797 0 # Node ID 025d6c8eebb6b519a5fe0497e18a070cc0069c48 # Parent d1a0ad142823c0afdbf4d7d55d2af74af91604b2 Simplify check whether byte swapping is necessary. diff -r d1a0ad142823 -r 025d6c8eebb6 libmpcodecs/ad_hwac3.c --- 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 {