[FFmpeg-cvslog] r30306 - in trunk/libswscale: rgb2rgb.c rgb2rgb.h rgb2rgb_template.c swscale.c swscale.h swscale_internal.h swscale_template.c x86/yuv2rgb_template.c yuv2rgb.c

Uoti Urpala uoti.urpala
Fri Jan 15 16:47:25 CET 2010


On Fri, 2010-01-15 at 06:55 -0800, Art Clarke wrote:
> On Fri, Jan 15, 2010 at 12:51 AM, zuxy <subversion at mplayerhq.hu> wrote:
> > Author: zuxy
> > Date: Fri Jan 15 09:51:51 2010
> > New Revision: 30306
> >
> > Log:
> > Const correctness for src pointer. Remove all constness related warnings in
> > libswscale.
> >
> > Modified:
> >   trunk/libswscale/rgb2rgb.c
> >   trunk/libswscale/rgb2rgb.h
> >   trunk/libswscale/rgb2rgb_template.c
> >   trunk/libswscale/swscale.c
> >   trunk/libswscale/swscale.h
> >   trunk/libswscale/swscale_internal.h
> >   trunk/libswscale/swscale_template.c
> >   trunk/libswscale/x86/yuv2rgb_template.c
> >   trunk/libswscale/yuv2rgb.c
> >
> 
> This breaks the swscale API's backwards compatibility:
> 
> ../../../../../../../csrc/com/xuggle/xuggler/VideoResampler.cpp:151:
> error: invalid conversion from ?uint8_t**? to ?const uint8_t**?
> ../../../../../../../csrc/com/xuggle/xuggler/VideoResampler.cpp:151:
> error:   initializing argument 2 of ?int sws_scale(SwsContext*, const
> uint8_t**, int*, int, int, uint8_t**, int*)?
> 
> I've worked around it in our code downstream, but I thought people
> would like to know.

Changing these further from "const uint8_t *src[]" to
"const uint8_t * const src[]" would probably avoid the above problem and
better match the actual intended semantics.




More information about the ffmpeg-cvslog mailing list