[FFmpeg-devel] qt-faststart refactor exit code

Diego Biurrun diego
Tue Jun 30 17:09:10 CEST 2009


On Mon, Jun 29, 2009 at 04:23:20PM -0700, Frank Barchard wrote:
> On Mon, Jun 29, 2009 at 3:24 PM, Diego Biurrun <diego at biurrun.de> wrote:
> 
> > On Mon, Jun 29, 2009 at 03:15:45PM -0700, Frank Barchard wrote:
> > >
> > > 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
> >
> > That does not apply cleanly at all.  Also, your patch is mangled.
> 
> Sorry about the newbie mistakes.  I was diff-ing from a git branch.
> This time I did this
> svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg_mainline
> svn diff -x -w tools/qt-faststart.c >faststart.diff
> and tested by doing this
> patch -p0 <faststart.diff

That worked like a charm.  Patch applied along with Baptiste's
suggestion to use PRId instead of PRIX.

> > > @@ -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",
> >
> > This is not correct, the '%' is gone..
> >
> 
> doh!  Fixed.  Hard to test, since it only happens errors.   I tried it with
> a 4 compilers and ran it, but the error doesnt normally come up.

I get a warning with gcc, this should be easy to trigger...

> > > >
> > > > Diego
> > > > _______________________________________________
> > > > ffmpeg-devel mailing list
> > > > ffmpeg-devel at mplayerhq.hu
> > > > https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
> > > >
> >
> > Please remove quoted text you do not reply to, thanks.
> >
> > Diego
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
> >

I asked you for something there, oh well...

Diego



More information about the ffmpeg-devel mailing list