[FFmpeg-devel] [PATCH] Const correctness for libswscale

Zuxy Meng zuxy.meng
Thu Jan 14 04:19:21 CET 2010


2010/1/14 M?ns Rullg?rd <mans at mansr.com>:
> Zuxy Meng <zuxy.meng at gmail.com> writes:
>
>> 2010/1/14 Ramiro Polla <ramiro.polla at gmail.com>:
>>> On Thu, Jan 14, 2010 at 12:32 AM, Zuxy Meng <zuxy.meng at gmail.com> wrote:
>>>> This patch avoids all const related warnings in libswscale via proper
>>>> declaration and casts.
>>>
>>>> Index: libswscale/rgb2rgb.c
>>>> ===================================================================
>>>> --- libswscale/rgb2rgb.c ? ? ?(???? 30298)
>>>> +++ libswscale/rgb2rgb.c ? ? ?(????????)
>>>> @@ -74,9 +74,6 @@
>>>> ? ? ? ? ? ? ? ? ? ? ?long lumStride, long chromStride, long srcStride);
>>>> ?void (*planar2x)(const uint8_t *src, uint8_t *dst, long width, long height,
>>>> ? ? ? ? ? ? ? ? ? long srcStride, long dstStride);
>>>> -void (*interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dst,
>>>> - ? ? ? ? ? ? ? ? ? ? ? ?long width, long height, long src1Stride,
>>>> - ? ? ? ? ? ? ? ? ? ? ? ?long src2Stride, long dstStride);
>>>> ?void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
>>>> ? ? ? ? ? ? ? ? ? ? ?uint8_t *dst1, uint8_t *dst2,
>>>> ? ? ? ? ? ? ? ? ? ? ?long width, long height,
>>>
>>> Unrelated?
>>
>> The prototype is declared in two places i.e. rgb2rgb.h and rgb2rgb.c
>> and the latter includes the former so rather than fixing it in both
>> files I just removed the redundant one in the .c file.
>
> That's not a prototype, that's a function pointer definition. ?Did you
> really test this?

Ooops I overlooked it. Actually I only compiled them.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: const.diff
Type: application/octet-stream
Size: 25506 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100114/c55d8df2/attachment.obj>



More information about the ffmpeg-devel mailing list