Skip to content

Commit 29ba33e

Browse files
committed
fix windows compilation: replace non-portable be32toh with rs_endian_fix
1 parent 2dc185d commit 29ba33e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/ft/ftfilecreator.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <cstdio>
2525
#include <sys/stat.h>
2626
#include "util/rsdebug.h"
27+
#include "util/rsendian.h"
2728

2829
#include "ftfilecreator.h"
2930
#include "util/rstime.h"
@@ -811,12 +812,12 @@ bool ftFileCreator::checkForMp4Index()
811812
if (fseek(f, currentPos, SEEK_SET) != 0 || fread(&header, 1, 8, f) != 8)
812813
break;
813814

814-
uint32_t atomSize = be32toh(header.size);
815+
uint32_t atomSize = rs_endian_fix(header.size);
815816
uint64_t realAtomSize = atomSize;
816817

817818
if (atomSize == 1) {
818819
uint64_t bigSize;
819-
if (fread(&bigSize, 1, 8, f) == 8) realAtomSize = be64toh(bigSize);
820+
if (fread(&bigSize, 1, 8, f) == 8) realAtomSize = rs_endian_fix(bigSize);
820821
}
821822

822823
// Create a null-terminated string for logging safely

0 commit comments

Comments
 (0)