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

Michael Niedermayer michaelni
Mon Sep 27 13:38:41 CEST 2010


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100927/6924552b/attachment.pgp>



More information about the ffmpeg-devel mailing list