[FFmpeg-devel] [PATCH 3/4] Move av_get_token() from libavfilter to libavutil.

Stefano Sabatini stefano.sabatini-lala
Mon Sep 27 18:28:01 CEST 2010


On date Monday 2010-09-27 13:38:41 +0200, Michael Niedermayer encoded:
> On Mon, Sep 27, 2010 at 12:29:39PM +0200, Stefano Sabatini wrote:
> > On date Monday 2010-09-27 12:04:49 +0200, Stefano Sabatini encoded:
> > > On date Tuesday 2010-06-15 08:00:55 +0200, Michael Niedermayer encoded:
> > > > On Sat, Jun 12, 2010 at 08:28:42PM +0200, Stefano Sabatini wrote:
> > > > > This may be useful also outside libavfilter. Note that this breaks the
> > > > > libavfilter ABI, but we don't care as its ABI is yet considered
> > > > > unstable.
> > > > [...]
> > > > > diff --git a/libavutil/avstring.h b/libavutil/avstring.h
> > > > > index 01c2391..042d171 100644
> > > > > --- a/libavutil/avstring.h
> > > > > +++ b/libavutil/avstring.h
> > > > > @@ -114,4 +114,19 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...);
> > > > >   */
> > > > >  char *av_d2str(double d);
> > > > >  
> > > > > +/**
> > > > > + * Unescapes the given string until a non escaped terminating char,
> > > > > + * and returns the token corresponding to the unescaped string.
> > > > > + *
> > > > > + * The normal \ and ' escaping is supported. 
> > > > 
> > > > 
> > > > > + * Leading and trailing
> > > > > + * whitespaces are removed.
> > > > 
> > > > Why?
> > > 
> > > Looks like the more intuitive behavior. If you want to inhibit
> > > whitespace trimming you can always do '   foo    '.
> 
> it should be documented and tested that only unescaped whitespace is removed
> 
> except that it should be ok

Applied.
-- 
FFmpeg = Frenzy & Furious Multipurpose Picky Eretic God



More information about the ffmpeg-devel mailing list