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

David Conrad lessen42
Thu Jan 21 10:52:13 CET 2010


On Jan 20, 2010, at 8:58 AM, Michael Niedermayer wrote:

> On Wed, Jan 20, 2010 at 03:09:22AM -0500, David Conrad wrote:
>> 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.
>> 
> 
>> commit 51f46c3724eacc4441808bf67f1c11414548548e
>> Author: David Conrad <lessen42 at gmail.com>
>> Date:   Wed Jan 20 03:08:26 2010 -0500
>> 
>>    More const-correctness for sws_scale
> 
> ok

Applied.



More information about the ffmpeg-devel mailing list