[FFmpeg-devel] [PATCH 1/3] avfilter/vf_deshake: use a void * comparator for consistency

Ganesh Ajjanagadde gajjanag at mit.edu
Sun Oct 25 02:04:37 CET 2015


On Sat, Oct 24, 2015 at 7:07 PM, Henrik Gramner <henrik at gramner.com> wrote:
> On Sun, Oct 25, 2015 at 12:02 AM, Ganesh Ajjanagadde
> <gajjanagadde at gmail.com> wrote:
>> -static int cmp(const double *a, const double *b)
>> +static int cmp(const void *a, const void *b)
>>  {
>> -    return *a < *b ? -1 : ( *a > *b ? 1 : 0 );
>> +    double va = *(double *)a, vb = *(double *)b;
>> +    return va < vb ? -1 : ( va > vb ? 1 : 0 );
>>  }
>
> This cast discards the const qualifier and may cause warnings
> depending on which compiler and compiler flags you use.

no warnings unfortunately; fixed. See also new patch.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list