[FFmpeg-devel] [PATCH] add locale month names to av_small_strptime

Nicolas George george at nsup.org
Mon Feb 20 12:47:50 EET 2017


Le primidi 1er ventôse, an CCXXV, Micah Galizia a écrit :
> +static const char *mo_abr[] = { "jan", "feb", "mar", "apr", "may", "jun",
> +                               "jul", "aug", "sep", "oct", "nov", "dec" };
> +
> +static const char *mo_full[] = { "uary", "ruary", "ch", "il", NULL, "e", "y",
> +                                "ust", "tember", "ober", "ember", "ember" };
> +

I do not have the time for a full review, but this was directly obvious
to me.

First, the indentation is strange.

Second, since you are using av_strncasecmp(3) anyway, no need to split
the words like that: month_name[i] will do fine for av_strncasecmp(3)
and month_name[i]+3 will do fine for your mo_full, which is a misnomer.

Regards,

-- 
  Nicolas George


More information about the ffmpeg-devel mailing list