[FFmpeg-devel] [PATCH] Stricter const prototypes for sws_scale_*

David Conrad lessen42
Wed Jan 20 09:09:22 CET 2010


On Jan 19, 2010, at 8:17 AM, Alexis Ballier wrote:

> Since src[x] isn't modified either, this doesn't harm and it is imho
> cleaner to declare the functions with the strictest prototype
> possible.
> As a side effect (that you probably couldn't care less), this fixes
> backward compatibilty for calling sws_scale from c++ as it doesn't
> allow converting ** to const ** but wants const* const*

Apparently C type conversion rules don't acknowledge that conversion from char ** to char const* const* is safe, and clang and gcc both happily warn about it. And gstreamer is apparently complaining that it breaks their build since they use -Werror and there was no API bump for them to #ifdef against.

Anyway, here's even more const qualifiers and a minor version bump, I dunno if C spec bugs deserve a major version bump.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: swscale-const.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100120/79959e74/attachment.txt>



More information about the ffmpeg-devel mailing list