[FFmpeg-devel] [PATCH] lavu: add av_small_strptime() in parseutils.h
Stefano Sabatini
stefasab at gmail.com
Wed Sep 5 15:51:30 CEST 2012
On date Tuesday 2012-09-04 20:53:31 +0200, Michael Niedermayer encoded:
> On Sat, Sep 01, 2012 at 01:34:19PM +0200, Stefano Sabatini wrote:
> > Allow to avoid a dependency on strptime() on systems which do not support
> > it.
> >
> > In particular, fix trac ticket #992.
> [...]
> > diff --git a/libavutil/parseutils.h b/libavutil/parseutils.h
> > index 7c7a91f..fc49ca9 100644
> > --- a/libavutil/parseutils.h
> > +++ b/libavutil/parseutils.h
> > @@ -133,6 +133,25 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
> > int av_parse_time(int64_t *timeval, const char *timestr, int duration);
> >
> > /**
> > + * Parse the input string p according to the format string fmt and
> > + * store its results in the structure dt.
> > + * This implementation supports only a subset of the formats supported
> ^
> add "currently", so that we can add more features without breaking
> API
>
> otherwise should be ok if it works
Nit time:
should be:
char *av_small_strptime(const char *p, const char *fmt, struct tm *dt);
like strptime, or:
const char *av_small_strptime(const char *p, const char *fmt, struct tm *dt);
like the current small_strptime()?
I'm in favor of the first variant for consistency with strptime() (I
can change that in a separate commit).
--
FFmpeg = Fascinating & Fanciful Miracolous Puristic EnGine
More information about the ffmpeg-devel
mailing list