Mercurial > mplayer.hg
comparison libmpcodecs/ad_hwac3.c @ 36161:025d6c8eebb6
Simplify check whether byte swapping is necessary.
author | reimar |
---|---|
date | Thu, 09 May 2013 10:53:17 +0000 |
parents | cc27da5d7286 |
children | cb10031f4ead |
comparison
equal
deleted
inserted
replaced
36160:d1a0ad142823 | 36161:025d6c8eebb6 |
---|---|
549 } | 549 } |
550 | 550 |
551 buf16[3] = fsize << 3; | 551 buf16[3] = fsize << 3; |
552 | 552 |
553 if (!convert_16bits) { | 553 if (!convert_16bits) { |
554 #if HAVE_BIGENDIAN | 554 int be_stream = indata_ptr[0] == 0x1f || indata_ptr[0] == 0x7f; |
555 /* BE stream */ | 555 if (be_stream == HAVE_BIGENDIAN) |
556 if (indata_ptr[0] == 0x1f || indata_ptr[0] == 0x7f) | |
557 #else | |
558 /* LE stream */ | |
559 if (indata_ptr[0] == 0xff || indata_ptr[0] == 0xfe) | |
560 #endif | |
561 memcpy(&buf[8], indata_ptr, fsize); | 556 memcpy(&buf[8], indata_ptr, fsize); |
562 else | 557 else |
563 { | 558 { |
564 swab(indata_ptr, &buf[8], fsize); | 559 swab(indata_ptr, &buf[8], fsize); |
565 if (fsize & 1) { | 560 if (fsize & 1) { |