summaryrefslogtreecommitdiffstats
path: root/media/tools
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 23:50:02 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 23:50:02 +0000
commitc9677a0ca3543505c23fbecc46c437f17ef89882 (patch)
tree748475bce4f2bac31424dafedf9ef3b5dbff3094 /media/tools
parent84e9ac5d6d34a24af7d75e7b7f77c31655c79365 (diff)
downloadchromium_src-c9677a0ca3543505c23fbecc46c437f17ef89882.zip
chromium_src-c9677a0ca3543505c23fbecc46c437f17ef89882.tar.gz
chromium_src-c9677a0ca3543505c23fbecc46c437f17ef89882.tar.bz2
qt_faststart use %PRIX64 for 64 bit value printfs for better compatibility with linux64 and mingw. Thanks to ambro on IIRC.
BUG=19999 TEST=use qt-faststart on mingw or linux64 and notice some of the printfs have invalid values. Review URL: http://codereview.chromium.org/174272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24046 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r--media/tools/qt_faststart.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/media/tools/qt_faststart.c b/media/tools/qt_faststart.c
index 2197c48..07b5aa3 100644
--- a/media/tools/qt_faststart.c
+++ b/media/tools/qt_faststart.c
@@ -32,6 +32,7 @@
#else
#pragma warning(push,1)
#define PRIu64 "I64u"
+#define PRIX64 "I64x"
#define uint64_t unsigned __int64
#define uint32_t unsigned int
#define uint8_t unsigned char
@@ -135,7 +136,7 @@ int main(int argc, char *argv[])
ftyp_atom_size = atom_size;
ftyp_atom = malloc(ftyp_atom_size);
if (!ftyp_atom) {
- printf ("could not allocate 0x%llX byte for ftyp atom\n",
+ printf ("could not allocate 0x%"PRIX64" byte for ftyp atom\n",
atom_size);
goto exit_cleanup;
}
@@ -163,8 +164,8 @@ int main(int argc, char *argv[])
(atom_type >> 16) & 255,
(atom_type >> 8) & 255,
(atom_type >> 0) & 255,
- (unsigned long long ) atom_offset,
- (unsigned long long ) atom_size);
+ atom_offset,
+ atom_size);
if ((atom_type != FREE_ATOM) &&
(atom_type != JUNK_ATOM) &&
@@ -196,7 +197,7 @@ int main(int argc, char *argv[])
moov_atom_size = last_atom_size;
moov_atom = malloc(moov_atom_size);
if (!moov_atom) {
- printf ("could not allocate 0x%llX byte for moov atom\n",
+ printf ("could not allocate 0x%"PRIX64" byte for moov atom\n",
atom_size);
goto exit_cleanup;
}
@@ -259,7 +260,7 @@ int main(int argc, char *argv[])
}
} else {
if (atom_type == FREE_ATOM) {
- printf ("free atom at %"PRIu64" removed.\n", (unsigned long long ) last_offset);
+ printf ("free atom at %"PRIu64" removed.\n", last_offset);
just_remove_free = 1;
} else {
printf ("Last atom in file was not a moov or free atom. Skipping.\n");