[FFmpeg-devel] [PATCH] qt_faststart: use proper PRI types and more helpful message

Reimar Döffinger Reimar.Doeffinger
Mon May 26 20:56:16 CEST 2008


Hello,
attached patch adds the encountered atom to the "encountered non-QT
top-level atom" message which is very useful for debugging and
it changes the llX printf type to the correct "PRIX64" (to be applied in
two parts obviously).
Comments/objections?

Greetings,
Reimar D?ffinger
-------------- next part --------------
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c
index 0ea9660..0c65863 100644
--- a/tools/qt-faststart.c
+++ b/tools/qt-faststart.c
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
             (atom_type != WIDE_ATOM) &&
             (atom_type != PICT_ATOM) &&
             (atom_type != FTYP_ATOM)) {
-            printf ("encountered non-QT top-level atom (is this a Quicktime file?)\n");
+            printf ("encountered non-QT top-level atom 0x%"PRIX32" (is this a Quicktime file?)\n", atom_type);
             break;
         }
 
@@ -129,7 +129,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);
                 fclose(infile);
                 return 1;
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
     moov_atom_size = 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);
         fclose(infile);
         return 1;



More information about the ffmpeg-devel mailing list