After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 607164 - sws_scale() 2nd argument type mismatch
sws_scale() 2nd argument type mismatch
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Windows
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-16 18:14 UTC by LRN
Modified: 2010-01-16 20:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description LRN 2010-01-16 18:14:05 UTC
gstffmpegscale.c: In function 'gst_ffmpegscale_transform':
gstffmpegscale.c:677: error: passing argument 2 of 'sws_scale' from incompatible pointer type
f:/gstreamer-buildslave/msys/1.0.11/local/include/libswscale/swscale.h:187: note: expected 'uint8_t **' but argument is of type 'const guint8 **'

1)
swscale.h says:
int sws_scale(struct SwsContext *context, uint8_t* srcSlice[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]);

2)
glibconfig.h says:
typedef unsigned char guint8;

3)
gstffmpegscale.c says:
sws_scale (scale->ctx, (const guint8 **) in_data, scale->in_stride, 0, scale->in_height, out_data, scale->out_stride);

The (3) is caused by http://cgit.freedesktop.org/gstreamer/gst-ffmpeg/commit/?id=0b40ac6331fece58617dbfaadb1460a93d38dad4

Everything worked before (3)

How to fix:
Supply in_data as (uint_8**) rather than (const guin8 **), because GCC thinks that sws_scale expects (uint8_t**).
Comment 1 LRN 2010-01-16 20:01:26 UTC
OK, it seems that i, somehow, had the right revision of ffmpeg, but wrong revision of swscale that did not had the 'const' argument.