[FFmpeg-devel] qt-faststart refactor exit code

Frank Barchard fbarchard
Tue Jun 30 00:15:45 CEST 2009


On Mon, Jun 29, 2009 at 2:52 PM, Diego Biurrun <diego at biurrun.de> wrote:

> On Mon, Jun 29, 2009 at 01:51:03PM -0700, Frank Barchard wrote:
> > On Mon, Jun 29, 2009 at 12:50 PM, Ramiro Polla <ramiro.polla at gmail.com
> >wrote:
> > > Please don't top-post (as in replying before the message). Just take a
> > > look at the archives, things go much smoother with interleaved
> > > quoting.
> >
> > Oops.  I'm new to this list.  I'd never heard of this 'top post' term
> before
> > ffmpeg.
>
> You conveniently skipped reading the paragraph about it on our mailing
> lists page.  Don't worry, you're in good company.
>
> > > > Re PRIu64
> > >
> >
> > Also note theres a minor bug with the existing code using %llx.  I
> deferred
> > fixing it, as y'all seem to prefer separate submissions for each fix.
>
> Sounds like something I could apply right away...


okay, I'm getting faster at these diffs.  The old code used %llX, which
doesnt work properly on MinGW.  It also assumes long long is int64, which
isn't guaranteed on all future compilers.  Standard GCC C99 inttypes.h
provides
#define PRIX64 "llX"
and maps to MinGW
#define PRIX64 "I64X"

Only 2 lines are affected, so heres the change:

--- tools/qt-faststart.orig.c   2009-05-07 21:41:30.000000000 -0700
+++ tools/qt-faststart.llx.c    2009-06-29 15:11:42.968285000 -0700
@@ -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 "X byte for moov atom\n",
             atom_size);
         fclose(infile);
         return 1;


>
> Diego
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>



More information about the ffmpeg-devel mailing list