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

Zuxy Meng zuxy.meng
Thu Jan 14 03:57:57 CET 2010


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.


-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the ffmpeg-devel mailing list