[FFmpeg-devel] [PATCH] Remove two warnings during libavformat build

Reimar Döffinger Reimar.Doeffinger
Sun May 4 17:25:38 CEST 2008


On Sun, May 04, 2008 at 12:35:35PM +0200, Diego Biurrun wrote:
> On Fri, May 02, 2008 at 06:43:21PM +0100, M?ns Rullg?rd wrote:
> > flameeyes at gmail.com (Diego 'Flameeyes' Petten?) writes:
> > 
> > > Trivial patch, on 64-bit architectures, int and long int have different
> > > sizes, and the difference between pointer (ptrdiff_t) is usually mapped
> > > on long int. At any rate, %ld should cover all architectures whatever
> > > their pointer size, afaict.
> > >
> > > --- a/libavformat/sdp.c
> > > +++ b/libavformat/sdp.c
> > > @@ -123,7 +123,7 @@ static char *extradata2psets(AVCodecContext *c)
> > >          }
> > >          if (av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r) == NULL) {
> > > -            av_log(c, AV_LOG_ERROR, "Cannot BASE64 encode %d %d!\n", MAX_PSET_SIZE - (p - psets), r1 - r);
> > > +            av_log(c, AV_LOG_ERROR, "Cannot BASE64 encode %ld %ld!\n", MAX_PSET_SIZE - (p - psets), r1 - r);
> > 
> > %td is the correct format for ptrdiff_t.
> 
> Fixed.

Though I'd be surprised if it works on MinGW...




More information about the ffmpeg-devel mailing list