[MPlayer-cvslog] r31959 - trunk/spudec.c

Diego Biurrun diego at biurrun.de
Tue Aug 17 17:15:46 CEST 2010


On Fri, Aug 13, 2010 at 01:39:18PM +0200, Reimar Döffinger wrote:
> On Fri, Aug 13, 2010 at 01:08:30PM +0200, diego wrote:
> > 
> > Log:
> > Mark constant sws_spu_image() parameter as const, fixes the warning:
> > spudec.c:874: warning: passing argument 2 of 'sws_scale' from incompatible pointer type
> > 
> > --- trunk/spudec.c	Wed Aug 11 22:59:03 2010	(r31958)
> > +++ trunk/spudec.c	Fri Aug 13 13:08:30 2010	(r31959)
> > @@ -852,8 +852,8 @@ static void scale_image(int x, int y, sc
> >  
> >  static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh,
> > -                          int ds, unsigned char *s1, unsigned char *s2, int sw,
> > -                          int sh, int ss)
> > +                          int ds, const unsigned char* s1, unsigned char* s2,
> > +                          int sw, int sh, int ss)
> 
> That looks inconsistent, why is s2 not const?

Because it is written to:

spudec.c:875: error: assignment of read-only location '*(s2 + (unsigned int)i)'

If you have a clean solution, I'm all ears...

Diego


More information about the MPlayer-cvslog mailing list